AlkantarClanX12

Your IP : 3.137.173.98


Current Path : /opt/imunify360/venv/lib64/python3.11/site-packages/yaml/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/yaml/__pycache__/parser.cpython-311.pyc

�

m��f�c��h�ddgZddlmZddlTddlTddlTGd�de��ZGd�d��ZdS)�Parser�ParserError�)�MarkedYAMLError)�*c��eZdZdS)rN)�__name__�
__module__�__qualname__���B/opt/imunify360/venv/lib64/python3.11/site-packages/yaml/parser.pyrrEs�������Drc���eZdZddd�Zd�Zd�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zd�Zd
�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"d$S)'r�!ztag:yaml.org,2002:)rz!!c�d�d|_d|_i|_g|_g|_|j|_dS�N)�
current_event�yaml_version�tag_handles�states�marks�parse_stream_start�state��selfs r
�__init__zParser.__init__Qs6��!��� �����������
��,��
�
�
rc�"�g|_d|_dSr)rrrs r
�disposezParser.disposeYs�������
�
�
rc��|j� |jr|���|_|j�!|sdS|D]}t|j|��rdS�dS)NTF)rr�
isinstance)r�choices�choices   r
�check_eventzParser.check_event^sp����%��z�
2�%)�Z�Z�\�\��"���)��
��t�!�
 �
 ���d�0�&�9�9� ��4�4� ��urc�^�|j� |jr|���|_|jSr�rrrs r
�
peek_eventzParser.peek_eventks.����%��z�
2�%)�Z�Z�\�\��"��!�!rc�p�|j� |jr|���|_|j}d|_|Srr$)r�values  r
�	get_eventzParser.get_eventrs:����%��z�
2�%)�Z�Z�\�\��"��"��!����rc��|���}t|j|j|j���}|j|_|S)N)�encoding)�	get_token�StreamStartEvent�
start_mark�end_markr*�parse_implicit_document_startr�r�token�events   r
rzParser.parse_stream_startsF����� � �� ��!1�5�>���)�)�)���7��
��rc�F�|�ttt��sh|j|_|���}|jx}}t||d���}|j	�
|j��|j|_
|S|���S)NF��explicit)�check_token�DirectiveToken�DocumentStartToken�StreamEndToken�DEFAULT_TAGSr�
peek_tokenr-�DocumentStartEventr�append�parse_document_end�parse_block_noder�parse_document_start)rr1r-r.r2s     r
r/z$Parser.parse_implicit_document_start�s�������0B�� � �	/�#�0�D���O�O�%�%�E�$)�$4�4�J��&�z�8�"�$�$�$�E�
�K���t�6�7�7�7��.�D�J��L��,�,�.�.�.rc�,�|�t��r.|���|�t���.|�t��s�|���}|j}|���\}}|�t��sCtddd|���j	z|���j���|���}|j
}t||d||���}|j�
|j��|j|_nG|���}t#|j|j
��}|jrJ�|jrJ�d|_|S)Nz)expected '<document start>', but found %rT)r5�version�tags)r6�DocumentEndTokenr+r9r;r-�process_directivesr8r�idr.r<rr=r>�parse_document_contentr�StreamEndEventr)rr1r-rBrCr.r2s       r
r@zParser.parse_document_start�s������/�0�0�	��N�N�������/�0�0�	�����/�/�	��O�O�%�%�E��)�J� �3�3�5�5�M�G�T��#�#�$6�7�7�
6�!�$��C��/�/�+�+�.�/����)�)�4�6�6�6��N�N�$�$�E��~�H�&�z�8�!�7��?�?�?�E��K���t�6�7�7�7��4�D�J�J��N�N�$�$�E�"�5�#3�U�^�D�D�E��{�"�"�?��z�!�!�>��D�J��rc���|���}|jx}}d}|�t��r|���}|j}d}t
|||���}|j|_|S)NFTr4)	r;r-r6rDr+r.�DocumentEndEventr@r)rr1r-r.r5r2s      r
r>zParser.parse_document_end�s������!�!�� %� 0�0�
�X������,�-�-�	��N�N�$�$�E��~�H��H� ��X�!�#�#�#���.��
��rc��|�tttt��rL|�|���j��}|j�	��|_
|S|���Sr)r6r7r8rDr9�process_empty_scalarr;r-r�poprr?)rr2s  r
rGzParser.parse_document_content�sp�����N�"�$4�n�F�F�	+��-�-�d�o�o�.?�.?�.J�K�K�E�����*�*�D�J��L��(�(�*�*�*rc��d|_i|_|�t��r�|���}|jdkrR|j�t
ddd|j���|j\}}|dkrt
ddd|j���|j|_nB|jdkr7|j\}}||jvrt
ddd|z|j���||j|<|�t����|jr!|j|j�	��f}n	|jdf}|j
D] }||jvr|j
||j|<�!|S)N�YAMLzfound duplicate YAML directiverz:found incompatible YAML document (version 1.* is required)�TAGzduplicate tag handle %r)rrr6r7r+�namerr-r'�copyr:)rr1�major�minor�handle�prefixr'�keys        r
rEzParser.process_directives�s��� ���������~�.�.�	2��N�N�$�$�E��z�V�#�#��$�0�%�d�D�<�e�>N�P�P�P�$�{���u��A�:�:�%�d�D�X�!�,�.�.�.�%*�K��!�!���u�$�$�!&������T�-�-�-�%�d�D�5��>�!�,�.�.�.�,2�� ��(�%���~�.�.�	2�&��	,��%�t�'7�'<�'<�'>�'>�>�E�E��%�t�+�E��$�	?�	?�C��$�*�*�*�(,�(9�#�(>�� ��%���rc�.�|�d���S)NT)�block��
parse_noders r
r?zParser.parse_block_nodes�����T��*�*�*rc�*�|���SrrZrs r
�parse_flow_nodezParser.parse_flow_nodes����� � � rc�0�|�dd���S)NT)rY�indentless_sequencerZrs r
�'parse_block_node_or_indentless_sequencez.Parser.parse_block_node_or_indentless_sequences�����T�t��D�D�DrFc	�4	�|�t��rT|���}t|j|j|j��}|j���|_	�n)d}d}dx}x}}	|�t��rm|���}|j}|j}|j}|�t��r)|���}|j}	|j}|j}n�|�t��rg|���}|jx}}	|j}|j}|�t��r"|���}|j}|j}|�8|\}
}|
�/|
|jvrtd|d|
z|	���|j|
|z}n|}|�|���jx}}d}|dup|dk}|rT|�t��r:|���j}t!|||||��}|j|_	�n^|�t$��rt|���}|j}|jr|�|dkrd}n|�d}nd}t)||||j|||j���}|j���|_	�n�|�t,��r<|���j}t!|||||d�	��}|j|_	�nz|�t0��r<|���j}t3|||||d�	��}|j|_	�n$|rU|�t6��r;|���j}t!|||||d
�	��}|j|_	n�|rU|�t:��r;|���j}t3|||||d
�	��}|j|_	nv|�|�5t)|||d
fd||��}|j���|_	n=|rd}
nd
}
|���}td|
z|d|jz|j���|S)Nzwhile parsing a nodezfound undefined tag handle %rr�TF)FT�FF)�styleT��
flow_styleF�rY�flowzwhile parsing a %s nodez'expected the node content, but found %r) r6�
AliasTokenr+�
AliasEventr'r-r.rrMr�AnchorToken�TagTokenrrr;�BlockEntryToken�SequenceStartEvent�parse_indentless_sequence_entry�ScalarToken�plain�ScalarEventrd�FlowSequenceStartToken�parse_flow_sequence_first_entry�FlowMappingStartToken�MappingStartEvent�parse_flow_mapping_first_key�BlockSequenceStartToken� parse_block_sequence_first_entry�BlockMappingStartToken�parse_block_mapping_first_keyrF)rrYr_r1r2�anchor�tagr-r.�tag_markrU�suffix�implicit�nodes              r
r[zParser.parse_nodes������J�'�'�a	.��N�N�$�$�E��u�{�E�,<�e�n�M�M�E�����*�*�D�J�J��F��C�/3�3�J�3��H�����,�,�
)����(�(��"�-�
� �>������#�#�H�-�-�&� �N�N�,�,�E�$�/�H�$�~�H��+�C���!�!�(�+�+�
)����(�(��(-�(8�8�
�X� �>���k���#�#�K�0�0�)� �N�N�,�,�E�$�~�H�"�[�F���!$�����%��T�%5�5�5�)�*@�*� ?�&� H� (�*�*�*��*�6�2�6�9�C�C� �C�
�!�(,���(9�(9�(D�D�
�X��E��t��1�s�c�z�H�"�4
.�t�'7�'7��'H�'H�4
.��?�?�,�,�5��*�6�3��"�H�.�.��!�A��
�
��#�#�K�0�0�..� �N�N�,�,�E�$�~�H���2����s�
�
�#0�����#0���#1��'���X�u�{�&����E�E�E�E�!%����!2�!2�D�J�J��%�%�&<�=�=�".�#���0�0�9�H�.�v�s�H�&��T�C�C�C�E�!%�!E�D�J�J��%�%�&;�<�<�.�#���0�0�9�H�-�f�c�8�&��T�C�C�C�E�!%�!B�D�J�J��.�t�/�/�0G�H�H�.�#���0�0�;�H�.�v�s�H�&��U�D�D�D�E�!%�!F�D�J�J��.�t�/�/�0F�G�G�.�#���0�0�;�H�-�f�c�8�&��U�D�D�D�E�!%�!C�D�J�J��'�3�?�(���h��5F��&��2�2�E�!%����!2�!2�D�J�J��&�&���%�� �O�O�-�-�E�%�&?�$�&F�
�E���P�!�,�.�.�.��rc��|���}|j�|j��|���Sr)r+rr=r-�parse_block_sequence_entry�rr1s  r
ryz'Parser.parse_block_sequence_first_entryxs<����� � ���
���%�*�+�+�+��.�.�0�0�0rc���|�t��r�|���}|�tt��s3|j�|j��|���S|j|_|�	|j
��S|�t��s>|���}td|j
dd|jz|j���|���}t!|j|j
��}|j���|_|j
���|S)Nz while parsing a block collection����"expected <block end>, but found %r)r6rmr+�
BlockEndTokenrr=r�r?rrLr.r;rrrFr-�SequenceEndEventrMr0s   r
r�z!Parser.parse_block_sequence_entry}s.�����O�,�,�	A��N�N�$�$�E��#�#�O�]�C�C�
A���"�"�4�#B�C�C�C��,�,�.�.�.�!�<��
��0�0���@�@�@����
�.�.�	W��O�O�%�%�E��@�$�*�R�.�8�5�8�C�U�EU�W�W�
W���� � �� ��!1�5�>�B�B���[�_�_�&�&��
��
�������rc��|�t��r�|���}|�tttt
��s3|j�|j��|�	��S|j|_
|�|j��S|�
��}t|j|j��}|j���|_
|Sr)r6rmr+�KeyToken�
ValueTokenr�rr=ror?rrLr.r;r�r-rMr0s   r
roz&Parser.parse_indentless_sequence_entry�s������O�,�,�	A��N�N�$�$�E��#�#�O��j�-�9�9�
A���"�"�4�#G�H�H�H��,�,�.�.�.�!�A��
��0�0���@�@�@����!�!�� ��!1�5�3C�D�D���[�_�_�&�&��
��rc��|���}|j�|j��|���Sr)r+rr=r-�parse_block_mapping_keyr�s  r
r{z$Parser.parse_block_mapping_first_key�s<����� � ���
���%�*�+�+�+��+�+�-�-�-rc���|�t��r�|���}|�ttt��s3|j�|j��|���S|j|_	|�
|j��S|�t��s>|���}td|jdd|jz|j���|���}t#|j|j��}|j���|_	|j���|S)Nzwhile parsing a block mappingr�r�)r6r�r+r�r�rr=�parse_block_mapping_valuer`rrLr.r;rrrFr-�MappingEndEventrMr0s   r
r�zParser.parse_block_mapping_key�s0�����H�%�%�	A��N�N�$�$�E��#�#�H�j�-�H�H�
A���"�"�4�#A�B�B�B��C�C�E�E�E�!�;��
��0�0���@�@�@����
�.�.�	W��O�O�%�%�E��=�t�z�"�~�8�5�8�C�U�EU�W�W�
W���� � ���� 0�%�.�A�A���[�_�_�&�&��
��
�������rc���|�t��r�|���}|�ttt��s3|j�|j��|���S|j|_	|�
|j��S|j|_	|���}|�
|j
��Sr)r6r�r+r�r�rr=r�r`rrLr.r;r-r�s  r
r�z Parser.parse_block_mapping_value�s������J�'�'�	?��N�N�$�$�E��#�#�H�j�-�H�H�
A���"�"�4�#?�@�@�@��C�C�E�E�E�!�9��
��0�0���@�@�@��5�D�J��O�O�%�%�E��,�,�U�-=�>�>�>rc��|���}|j�|j��|�d���S�NT)�first)r+rr=r-�parse_flow_sequence_entryr�s  r
rtz&Parser.parse_flow_sequence_first_entry�sA����� � ���
���%�*�+�+�+��-�-�D�-�9�9�9rc�4�|�t���s|sm|�t��r|���n>|���}td|jdd|jz|j���|�t��rA|���}tddd|j|jd���}|j|_
|S|�t��s3|j�|j��|���S|���}t%|j|j��}|j���|_
|j���|S)Nzwhile parsing a flow sequencer�zexpected ',' or ']', but got %rTre)r6�FlowSequenceEndToken�FlowEntryTokenr+r;rrrFr-r�rvr.�%parse_flow_sequence_entry_mapping_keyrrr=r�r]r�rM�rr�r1r2s    r
r�z Parser.parse_flow_sequence_entry�sy����� 4�5�5�	.��
\��#�#�N�3�3�\��N�N�$�$�$�$� �O�O�-�-�E�%�&E�t�z�RT�~�=���H�%�JZ�\�\�\�����)�)�	
.����)�)��)�$��d��(�%�.�#'�)�)�)��"�G��
����%�%�&:�;�;�
.���"�"�4�#A�B�B�B��+�+�-�-�-���� � �� ��!1�5�>�B�B���[�_�_�&�&��
��
�������rc�(�|���}|�ttt��s3|j�|j��|���S|j|_	|�
|j��Sr)r+r6r�r�r�rr=�'parse_flow_sequence_entry_mapping_valuer]rrLr.r�s  r
r�z,Parser.parse_flow_sequence_entry_mapping_key�s|����� � �����
�� 4�6�6�	=��K���t�K�L�L�L��'�'�)�)�)��E�D�J��,�,�U�^�<�<�<rc���|�t��r�|���}|�tt��s3|j�|j��|���S|j|_	|�
|j��S|j|_	|���}|�
|j
��Sr)r6r�r+r�r�rr=�%parse_flow_sequence_entry_mapping_endr]rrLr.r;r-r�s  r
r�z.Parser.parse_flow_sequence_entry_mapping_values������J�'�'�	?��N�N�$�$�E��#�#�N�4H�I�I�
A���"�"�4�#M�N�N�N��+�+�-�-�-�!�G��
��0�0���@�@�@��C�D�J��O�O�%�%�E��,�,�U�-=�>�>�>rc�v�|j|_|���}t|j|j��Sr)r�rr;r�r-r�s  r
r�z,Parser.parse_flow_sequence_entry_mapping_ends1���3��
����!�!���u�/��1A�B�B�Brc��|���}|j�|j��|�d���Sr�)r+rr=r-�parse_flow_mapping_keyr�s  r
rwz#Parser.parse_flow_mapping_first_keysA����� � ���
���%�*�+�+�+��*�*��*�6�6�6rc���|�t���si|sm|�t��r|���n>|���}td|jdd|jz|j���|�t��r�|���}|�ttt��s3|j�|j
��|���S|j
|_|�|j��S|�t��s3|j�|j��|���S|���}t'|j|j��}|j���|_|j���|S)Nzwhile parsing a flow mappingr�zexpected ',' or '}', but got %r)r6�FlowMappingEndTokenr�r+r;rrrFr-r�r�rr=�parse_flow_mapping_valuer]rrLr.�parse_flow_mapping_empty_valuer�rMr�s    r
r�zParser.parse_flow_mapping_keys������ 3�4�4�	.��
\��#�#�N�3�3�\��N�N�$�$�$�$� �O�O�-�-�E�%�&D�d�j�QS�n�=���H�%�JZ�\�\�\�����)�)�
.����(�(���'�'�
�&�(;�=�=�E��K�&�&�t�'D�E�E�E��/�/�1�1�1�!%�!>�D�J��4�4�U�^�D�D�D��%�%�&9�:�:�
.���"�"�4�#F�G�G�G��+�+�-�-�-���� � ���� 0�%�.�A�A���[�_�_�&�&��
��
�������rc���|�t��r�|���}|�tt��s3|j�|j��|���S|j|_	|�
|j��S|j|_	|���}|�
|j
��Sr)r6r�r+r�r�rr=r�r]rrLr.r;r-r�s  r
r�zParser.parse_flow_mapping_value9s������J�'�'�	?��N�N�$�$�E��#�#�N�4G�H�H�
A���"�"�4�#>�?�?�?��+�+�-�-�-�!�8��
��0�0���@�@�@��4�D�J��O�O�%�%�E��,�,�U�-=�>�>�>rc�r�|j|_|�|���j��Sr)r�rrLr;r-rs r
r�z%Parser.parse_flow_mapping_empty_valueGs-���0��
��(�(����):�):�)E�F�F�Frc�*�tdddd||��S)Nrbrg)rr)r�marks  r
rLzParser.process_empty_scalarKs���4��}�b�$��E�E�ErNrc)F)#rr	r
r:rrr"r%r(rr/r@r>rGrEr?r]r`r[ryr�ror{r�r�rtr�r�r�r�rwr�r�r�rLrrr
rrHs������
�#���L�
-�-�-����
���"�"�"����
�
�
�/�/�/�(���>���$+�+�+����^+�+�+�!�!�!�E�E�E�c�c�c�c�N1�1�1�
���*
�
�
�(.�.�.�
���&?�?�?�2:�:�:�
����4=�=�=�?�?�?�C�C�C�7�7�7�
����6?�?�?�G�G�G�F�F�F�F�FrN)�__all__�errorr�tokens�events�scannerrrrrr
�<module>r�s���|�]�
#��"�"�"�"�"�"�������������	�	�	�	�	�/�	�	�	�DF�DF�DF�DF�DF�DF�DF�DF�DF�DFr