관리-도구
편집 파일: Gsml.cpython-37.opt-1.pyc
B �]� � @ s G d d� d�Z G dd� d�ZdS )c @ sT e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� ZdS )�GsmlHandlerc C s^ | j �| j� g | _|rZg }x$|D ]\}}|�| j�||�� q"W | j�| j�dd|�� d S )N�with� )�stack�append�out�mod�node_of_taci)�self�tagZattrsZat�k�v� r �A/opt/alt/python37/lib64/python3.7/site-packages/guppy/gsl/Gsml.py�handle_starttag s zGsmlHandler.handle_starttagc C s. | j �|d| j�}| j�� | _| j�|� d S )Nr )r r r r �popr )r r �noder r r � handle_endtag s zGsmlHandler.handle_endtagc C sz |d d� dkr,t |dd � d�}d| }nt |�}d| krHdk r`n nt|�}| �|� n| j�| j�d|�� d S )N� �x� �0� � �char)�int�chr�handle_datar r r r )r �namer r r r �handle_charref s zGsmlHandler.handle_charrefc C s0 || j jkr| �|� | j�| j �d|�� d S )Nr )r Z entitydefs�unknown_entityrefr r r )r r r r r �handle_entityref s zGsmlHandler.handle_entityrefc C s t d| ��d S )NzUnknown entity ref: %r)�SyntaxError)r r r r r r # s zGsmlHandler.unknown_entityrefc C s |� � r| j�| j�|�� d S )N)�stripr �extendr Z nodes_of_text)r �datar r r r &