관리-도구
편집 파일: parser.cpython-38.pyc
U .?�f�c � @ sN d dgZ ddlmZ ddlT ddlT ddlT G dd� de�ZG dd � d �ZdS )�Parser�ParserError� )�MarkedYAMLError)�*c @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r r �;/opt/hc_python/lib64/python3.8/site-packages/yaml/parser.pyr E s c @ s e Zd Zddd�Zdd� Zdd� Zdd � Zd d� Zdd � Zdd� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� ZdDd!d"�Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zd/d0� ZdEd1d2�Zd3d4� Zd5d6� Zd7d8� Zd9d:� ZdFd;d<�Zd=d>� Z d?d@� Z!dAdB� Z"dCS )Gr �!ztag:yaml.org,2002:)r z!!c C s* d | _ d | _i | _g | _g | _| j| _d S �N)� current_event�yaml_version�tag_handles�states�marks�parse_stream_start�state��selfr r r �__init__Q s zParser.__init__c C s g | _ d | _d S r )r r r r r r �disposeY s zParser.disposec G sL | j d kr| jr| �� | _ | j d k rH|s,dS |D ]}t| j |�r0 dS q0dS )NTF)r r � isinstance)r �choices�choicer r r �check_event^ s zParser.check_eventc C s | j d kr| jr| �� | _ | j S r �r r r r r r � peek_eventk s zParser.peek_eventc C s* | j d kr| jr| �� | _ | j }d | _ |S r r )r �valuer r r � get_eventr s zParser.get_eventc C s( | � � }t|j|j|jd�}| j| _|S )N)�encoding)� get_tokenZStreamStartEvent� start_mark�end_markr �parse_implicit_document_startr �r �token�eventr r r r s �zParser.parse_stream_startc C s\ | � ttt�sP| j| _| �� }|j }}t||dd�}| j � | j� | j| _ |S | �� S d S )NF��explicit)�check_token�DirectiveToken�DocumentStartToken�StreamEndToken�DEFAULT_TAGSr � peek_tokenr"