%PDF- %PDF-
Direktori : /lib/python3/dist-packages/yaml/__pycache__/ |
Current File : //lib/python3/dist-packages/yaml/__pycache__/parser.cpython-312.pyc |
� f�c � �` � d dgZ ddlmZ ddl� ddl� ddl� G d� de� Z G d� d � Zy)�Parser�ParserError� )�MarkedYAMLError)�*c � � e Zd Zy)r N)�__name__� __module__�__qualname__� � �-/usr/lib/python3/dist-packages/yaml/parser.pyr r E s � �r c �� � e Zd Zddd�Zd� Zd� Zd� Zd� Zd� Zd � Z d � Z d� Zd� Zd � Z d� Zd� Zd� Zd� Zd$d�Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd%d�Zd� Zd� Zd� Zd� Zd%d�Zd � Z d!� Z!d"� Z"y#)&r �!ztag:yaml.org,2002:)r z!!c �l � d | _ d | _ i | _ g | _ g | _ | j | _ y �N)� current_event�yaml_version�tag_handles�states�marks�parse_stream_start�state��selfs r �__init__zParser.__init__Q s5 � �!��� ����������� ��,�,�� r c � � g | _ d | _ y r )r r r s r �disposezParser.disposeY s � ������ r c � � | j �!| j r| j � | _ | j �"|sy|D ] }t | j |� s� y y)NTF)r r � isinstance)r �choices�choices r �check_eventzParser.check_event^ s\ � ����%��z�z�%)�Z�Z�\��"����)���!� ���d�0�0�&�9�� � r c �t � | j �!| j r| j � | _ | j S r �r r r s r � peek_eventzParser.peek_eventk s/ � ����%��z�z�%)�Z�Z�\��"��!�!�!r c � � | j �!| j r| j � | _ | j }d | _ |S r r$ )r �values r � get_eventzParser.get_eventr s; � ����%��z�z�%)�Z�Z�\��"��"�"��!����r c � � | j � }t |j |j |j �� }| j | _ |S )N)�encoding)� get_token�StreamStartEvent� start_mark�end_markr* �parse_implicit_document_startr �r �token�events r r zParser.parse_stream_start sC � � ��� �� ��!1�!1�5�>�>����)�� �7�7�� ��r c �J � | j t t t � su| j | _ | j � }|j x}}t ||d�� }| j j | j � | j | _ |S | j � S )NF��explicit)�check_token�DirectiveToken�DocumentStartToken�StreamEndToken�DEFAULT_TAGSr � peek_tokenr- �DocumentStartEventr �append�parse_document_end�parse_block_noder �parse_document_start)r r1 r- r. r2 s r r/ z$Parser.parse_implicit_document_start� s� � � ����0B�� �#�0�0�D���O�O�%�E�$)�$4�$4�4�J��&�z�8�"�$�E� �K�K���t�6�6�7��.�.�D�J��L� �,�,�.�.r c � � | j t � r&| j � | j t � r�&| j t � s�| j � }|j }| j � \ }}| j t � sAt d d d| j � j z | j � j � �| j � }|j }t ||d||�� }| j j | j � | j | _ |S | j � }t# |j |j � }| j rJ �| j$ rJ �d | _ |S )Nz)expected '<document start>', but found %rT)r5 �version�tags)r6 �DocumentEndTokenr+ r9 r; r- �process_directivesr8 r �idr. r<