Mini Shell
a
�DOg3 � @ s� d dl Z e �d�Zd"dd�Zdd� Zdd� Zd d
� Zdd� Zd
d� Zdd� Z dd� Z
dd� Zdd� Zeee ee
ed�Z
i ZG dd� d�Zd#dd�Zd$dd�Zd%dd�Zd&d d!�ZdS )'� Nz\('[^']*'|\"[^\"]*\"|::|//?|\.\.|\(\)|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/\[\]\(\)@=\s]+)|\s+c c s� |r|� d�nd }d}t�| �D ]�}|\}}|r�|d dkr�d|v r�|�dd�\}}z"|s^t�|d|| |f fV W q� ty� td| �d �Y q�0 n"|r�|s�|d||f fV n|V d}q |V |d k}q d S )
N� Fr �{�:� z{%s}%sz!prefix %r not found in prefix map�@)�get�xpath_tokenizer_re�findall�split�KeyError�SyntaxError) �pattern�
namespacesZdefault_namespaceZparsing_attribute�tokenZttype�tag�prefixZuri� r �-/usr/lib64/python3.9/xml/etree/ElementPath.py�xpath_tokenizerI s&