AlkantarClanX12

Your IP : 13.58.61.197


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

�

�܋fO���r�ddgZddlmZddlTGd�de��ZGd�d��ZGd�d��Zd	S)
�Scanner�ScannerError�)�MarkedYAMLError)�*c��eZdZdS)rN)�__name__�
__module__�__qualname__���C/opt/cloudlinux/venv/lib64/python3.11/site-packages/yaml/scanner.pyrr s�������Drc��eZdZd�ZdS)�	SimpleKeyc�Z�||_||_||_||_||_||_dS�N)�token_number�required�index�line�column�mark)�selfrrrrrrs       r
�__init__zSimpleKey.__init__&s1��(��� ��
���
���	������	�	�	rN)rr	r
rrrr
rr#s#����������rrc�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1d0�Z2d1�Z3d2�Z4d3�Z5d4�Z6d5�Z7d6�Z8d7�Z9d8�Z:d9�Z;d:�Z<d;�Z=d<�Z>d=�Z?d>�Z@id?d@�dAdB�dCdD�dEdF�dFdF�dGdH�dIdJ�dKdL�dMdN�dOdP�dQdQ�dRdR�dSdS�dTdT�dUdV�dWdX�dYdZ�d[d\i�ZAd]d^d_d`�ZBda�ZCdb�ZDdc�ZEdd�ZFde�ZGdf�ZHdg�ZIdh�ZJdi�ZKdjS)krc��d|_d|_g|_|���d|_d|_g|_d|_i|_dS)zInitialize the scanner.F����TN)	�done�
flow_level�tokens�fetch_stream_start�tokens_taken�indent�indents�allow_simple_key�possible_simple_keys�rs r
rzScanner.__init__0sg����	�������	
���!�!�!����������,!%���%'��!�!�!rc���|���r(|���|����(|jr'|sdS|D] }t|jd|��rdS�!dS)NTrF)�need_more_tokens�fetch_more_tokensr �
isinstance)r�choices�choices   r
�check_tokenzScanner.check_tokenqs����#�#�%�%�	%��"�"�$�$�$��#�#�%�%�	%��;�	 ��
��t�!�
 �
 ���d�k�!�n�f�5�5� ��4�4� ��urc��|���r(|���|����(|jr
|jdSdS)Nr)r)r*r r's r
�
peek_tokenzScanner.peek_token}s[���#�#�%�%�	%��"�"�$�$�$��#�#�%�%�	%��;�	��;�q�>�!��4rc���|���r(|���|����(|jr*|xjdz
c_|j�d��SdS)Nrr)r)r*r r"�popr's r
�	get_tokenzScanner.get_token�sz���#�#�%�%�	%��"�"�$�$�$��#�#�%�%�	%��;�	&�����"����;�?�?�1�%�%�%�	&�	&rc��|jrdS|jsdS|���|���|jkrdSdS)NFT)rr �stale_possible_simple_keys�next_possible_simple_keyr"r's r
r)zScanner.need_more_tokens�s\���9�	��5��{�	��4�	
�'�'�)�)�)��(�(�*�*�d�.?�?�?��4�@�?rc�4�|���|���|�|j��|���}|dkr|���S|dkr(|���r|���S|dkr(|���r|�	��S|dkr(|�
��r|���S|dkr|���S|dkr|�
��S|dkr|���S|dkr|���S|d	kr|���S|dkr(|���r|���S|d
kr(|���r|���S|dkr(|���r|���S|dkr|���S|d
kr|���S|dkr|���S|dkr|js|���S|dkr|js|���S|dkr|���S|dkr|���S|���r|� ��StCddd|z|�"�����)N��%�-�.�[�{�]�}�,�?�:r�&�!�|�>�'�"z!while scanning for the next tokenz.found character %r that cannot start any token)#�scan_to_next_tokenr5�
unwind_indentr�peek�fetch_stream_end�check_directive�fetch_directive�check_document_start�fetch_document_start�check_document_end�fetch_document_end�fetch_flow_sequence_start�fetch_flow_mapping_start�fetch_flow_sequence_end�fetch_flow_mapping_end�fetch_flow_entry�check_block_entry�fetch_block_entry�	check_key�	fetch_key�check_value�fetch_value�fetch_alias�fetch_anchor�	fetch_tagr�
fetch_literal�fetch_folded�fetch_single�fetch_double�check_plain�fetch_plainr�get_mark�r�chs  r
r*zScanner.fetch_more_tokens�s2��	
���!�!�!�	
�'�'�)�)�)�	
���4�;�'�'�'��Y�Y�[�[����:�:��(�(�*�*�*���9�9��-�-�/�/�9��'�'�)�)�)���9�9��2�2�4�4�9��,�,�.�.�.���9�9��0�0�2�2�9��*�*�,�,�,���9�9��1�1�3�3�3���9�9��0�0�2�2�2���9�9��/�/�1�1�1���9�9��.�.�0�0�0���9�9��(�(�*�*�*���9�9��/�/�1�1�9��)�)�+�+�+���9�9����)�)�9��>�>�#�#�#���9�9��)�)�+�+�9��#�#�%�%�%���9�9��#�#�%�%�%���9�9��$�$�&�&�&���9�9��>�>�#�#�#���9�9�T�_�9��%�%�'�'�'���9�9�T�_�9��$�$�&�&�&���:�:��$�$�&�&�&���:�:��$�$�&�&�&������	&��#�#�%�%�%��>��@�2�E��
�
���!�!�	!rc�`�d}|jD]#}|j|}|�|j|kr|j}�$|Sr)r&r)r�min_token_number�level�keys    r
r6z Scanner.next_possible_simple_keysM�� ���.�	4�	4�E��+�E�2�C��'�3�+;�>N�+N�+N�#&�#3� ���rc��t|j��D]j}|j|}|j|jks|j|jz
dkr8|jr)td|jd|������|j|=�kdS)Ni�while scanning a simple key�could not find expected ':')�listr&rrrrrrg)rrlrms   r
r5z"Scanner.stale_possible_simple_keyss����$�3�4�4�	5�	5�E��+�E�2�C��x�4�9�$�$��z�#�)�+�d�2�2��<�L�&�'D�c�h�9�4�=�=�?�?�L�L�L��-�e�4��	5�	5rc	�0�|jo|j|jk}|jrv|���|jt
|j��z}t|||j	|j
|j|�����}||j|j<dSdSr)
rr#rr%�remove_possible_simple_keyr"�lenr rrrrgr&)rrrrms    r
�save_possible_simple_keyz Scanner.save_possible_simple_key's�����&�E�4�;�$�+�+E��� �	=��+�+�-�-�-��,�S���-=�-=�=�L��L�(��J��	�4�;��
�
���I�I�C�9<�D�%�d�o�6�6�6�	=�	=rc���|j|jvrQ|j|j}|jr)td|jd|������|j|j=dSdS)Nrorp)rr&rrrrg)rrms  r
rsz"Scanner.remove_possible_simple_key8sr���?�d�7�7�7��+�D�O�<�C��|�
H�"�#@�#�(�5�t�}�}���H�H�H��)�$�/�:�:�:�8�7rc��|jrdS|j|krg|���}|j���|_|j�t||����|j|k�edSdSr)rr#rgr$r2r �append�
BlockEndToken)rrrs   r
rJzScanner.unwind_indentEs���?�	��F��k�F�"�"��=�=�?�?�D��,�*�*�,�,�D�K��K���}�T�4�8�8�9�9�9��k�F�"�"�"�"�"�"rc�l�|j|kr(|j�|j��||_dSdS)NTF)r#r$rx)rrs  r
�
add_indentzScanner.add_indent]s8���;�����L�����,�,�,� �D�K��4��urc��|���}|j�t|||j�����dS)N)�encoding)rgr rx�StreamStartTokenr}�rrs  r
r!zScanner.fetch_stream_startgsR��
�}�}����	
����+�D�$��]�$�$�$�	%�	%�	%�	%�	%rc��|�d��|���d|_i|_|���}|j�t||����d|_dS)NrFT)	rJrsr%r&rgr rx�StreamEndTokenrrs  r
rLzScanner.fetch_stream_endssz��	
���2����	
�'�'�)�)�)� %���$&��!��}�}����	
����>�$��5�5�6�6�6���	�	�	rc��|�d��|���d|_|j�|�����dS)NrF)rJrsr%r rx�scan_directiver's r
rNzScanner.fetch_directive�s^��	
���2����	
�'�'�)�)�)� %���	
����4�.�.�0�0�1�1�1�1�1rc�:�|�t��dSr)�fetch_document_indicator�DocumentStartTokenr's r
rPzScanner.fetch_document_start�s���%�%�&8�9�9�9�9�9rc�:�|�t��dSr)r��DocumentEndTokenr's r
rRzScanner.fetch_document_end�s���%�%�&6�7�7�7�7�7rc�(�|�d��|���d|_|���}|�d��|���}|j�|||����dS)NrF�)rJrsr%rg�forwardr rx�r�
TokenClass�
start_mark�end_marks    r
r�z Scanner.fetch_document_indicator�s���	
���2����	
�'�'�)�)�)� %����]�]�_�_�
����Q�����=�=�?�?������:�:�j�(�;�;�<�<�<�<�<rc�:�|�t��dSr)�fetch_flow_collection_start�FlowSequenceStartTokenr's r
rSz!Scanner.fetch_flow_sequence_start�s���(�(�)?�@�@�@�@�@rc�:�|�t��dSr)r��FlowMappingStartTokenr's r
rTz Scanner.fetch_flow_mapping_start�s���(�(�)>�?�?�?�?�?rc��|���|xjdz
c_d|_|���}|���|���}|j�|||����dS)NrT)rurr%rgr�r rxr�s    r
r�z#Scanner.fetch_flow_collection_start�s���	
�%�%�'�'�'�	
���1����!%����]�]�_�_�
��������=�=�?�?������:�:�j�(�;�;�<�<�<�<�<rc�:�|�t��dSr)�fetch_flow_collection_end�FlowSequenceEndTokenr's r
rUzScanner.fetch_flow_sequence_end�s���&�&�';�<�<�<�<�<rc�:�|�t��dSr)r��FlowMappingEndTokenr's r
rVzScanner.fetch_flow_mapping_end�s���&�&�':�;�;�;�;�;rc��|���|xjdzc_d|_|���}|���|���}|j�|||����dS)NrF)rsrr%rgr�r rxr�s    r
r�z!Scanner.fetch_flow_collection_end�s���	
�'�'�)�)�)�	
���1����!&����]�]�_�_�
��������=�=�?�?������:�:�j�(�;�;�<�<�<�<�<rc��d|_|���|���}|���|���}|j�t
||����dS�NT)r%rsrgr�r rx�FlowEntryToken)rr�r�s   r
rWzScanner.fetch_flow_entry�so��!%���	
�'�'�)�)�)��]�]�_�_�
��������=�=�?�?������>�*�h�?�?�@�@�@�@�@rc��|js�|js$tddd|������|�|j��r<|���}|j�t||����n	d|_|�	��|���}|�
��|���}|j�t||����dS)Nz%sequence entries are not allowed hereT)rr%rrgr{rr rx�BlockSequenceStartTokenrsr��BlockEntryToken�rrr�r�s    r
rYzScanner.fetch_block_entry�s�����	��(�
)�"�4��?��
�
���)�)�)�
���t�{�+�+�
H��}�}������"�"�#:�4��#F�#F�G�G�G��

�!%���	
�'�'�)�)�)��]�]�_�_�
��������=�=�?�?������?�:�x�@�@�A�A�A�A�Arc� �|js�|js$tddd|������|�|j��r<|���}|j�t||����|j|_|�	��|���}|�
��|���}|j�t||����dS)Nz!mapping keys are not allowed here)rr%rrgr{rr rx�BlockMappingStartTokenrsr��KeyTokenr�s    r
r[zScanner.fetch_keys�����	G��(�
)�"�4��;��
�
���)�)�)�
���t�{�+�+�
G��}�}������"�"�#9�$��#E�#E�F�F�F�%)�O� 3���	
�'�'�)�)�)��]�]�_�_�
��������=�=�?�?������8�J��9�9�:�:�:�:�:rc���|j|jvr�|j|j}|j|j=|j�|j|jz
t
|j|j����|jsZ|�|j	��r@|j�|j|jz
t|j|j����d|_n�|js+|js$tddd|�
�����|jsV|�|j	��r<|�
��}|j�t||����|j|_|���|�
��}|���|�
��}|j�t#||����dS)NFz#mapping values are not allowed here)rr&r �insertrr"r�rr{rr�r%rrgrxrsr��
ValueToken)rrmrr�r�s     r
r]zScanner.fetch_value!s����?�d�7�7�7��+�D�O�<�C��)�$�/�:��K���s�/��0A�A��S�X�s�x�0�0�
2�
2�
2�
�?�
H��?�?�3�:�.�.�H��K�&�&�s�'7��8I�'I�2�3�8�S�X�F�F�H�H�H�%*�D�!�!��?�
-��,�-�&�t�T�A� �M�M�O�O�-�-�-��?�
K��?�?�4�;�/�/�K��=�=�?�?�D��K�&�&�'=�d�D�'I�'I�J�J�J�)-��$7�D�!�
�+�+�-�-�-��]�]�_�_�
��������=�=�?�?������:�j�(�;�;�<�<�<�<�<rc��|���d|_|j�|�t
����dS�NF)rur%r rx�scan_anchor�
AliasTokenr's r
r^zScanner.fetch_aliasYsL��	
�%�%�'�'�'�!&���	
����4�+�+�J�7�7�8�8�8�8�8rc��|���d|_|j�|�t
����dSr�)rur%r rxr��AnchorTokenr's r
r_zScanner.fetch_anchordsL��	
�%�%�'�'�'�!&���	
����4�+�+�K�8�8�9�9�9�9�9rc��|���d|_|j�|�����dSr�)rur%r rx�scan_tagr's r
r`zScanner.fetch_tagosF��	
�%�%�'�'�'�!&���	
����4�=�=�?�?�+�+�+�+�+rc�2�|�d���dS)NrE��style��fetch_block_scalarr's r
razScanner.fetch_literalz������c��*�*�*�*�*rc�2�|�d���dS)NrFr�r�r's r
rbzScanner.fetch_folded}r�rc��d|_|���|j�|�|����dSr�)r%rsr rx�scan_block_scalar�rr�s  r
r�zScanner.fetch_block_scalar�sL��!%���	
�'�'�)�)�)�	
����4�1�1�%�8�8�9�9�9�9�9rc�2�|�d���dS)NrGr���fetch_flow_scalarr's r
rczScanner.fetch_single�s�����T��*�*�*�*�*rc�2�|�d���dS)NrHr�r�r's r
rdzScanner.fetch_double�s�����S��)�)�)�)�)rc��|���d|_|j�|�|����dSr�)rur%r rx�scan_flow_scalarr�s  r
r�zScanner.fetch_flow_scalar�sL��	
�%�%�'�'�'�!&���	
����4�0�0��7�7�8�8�8�8�8rc��|���d|_|j�|�����dSr�)rur%r rx�
scan_plainr's r
rfzScanner.fetch_plain�sH��	
�%�%�'�'�'�
!&���	
����4�?�?�,�,�-�-�-�-�-rc� �|jdkrdSdS)NrT)rr's r
rMzScanner.check_directive�s���;�!����4��rc��|jdkr2|�d��dkr|�d��dvrdSdSdSdS)Nrr��---�
 	
…

T�r�prefixrKr's r
rOzScanner.check_document_start��U���;�!����{�{�1�~�~��&�&��	�	�!���(C�C�C��t���&�&�C�Crc��|jdkr2|�d��dkr|�d��dvrdSdSdSdS)Nrr��...r�Tr�r's r
rQzScanner.check_document_end�r�rc�0�|�d��dvS)Nrr�)rKr's r
rXzScanner.check_block_entry�s���y�y��|�|�:�:�:rc�B�|jrdS|�d��dvS�NTrr��rrKr's r
rZzScanner.check_key��+���?�	?��4��9�9�Q�<�<�#>�>�>rc�B�|jrdS|�d��dvSr�r�r's r
r\zScanner.check_value�r�rc��|���}|dvp(|�d��dvo|dkp|jo|dvS)Nu  	
…

-?:,[]{}#&*!|>'"%@`rr�r:z?:)rKrrhs  r
rezScanner.check_plain�sY���Y�Y�[�[���I�I�Q��I�I�a�L�L�(C�C�P��3�Y�N�t��+>�+M�2��:�	Qrc��|jdkr,|���dkr|���d}|s�|���dkr,|���|���dk�,|���dkr@|���dvr*|���|���dv�*|���r|jsd|_nd}|��dSdS)NruF� �#�
…

T)rrKr��scan_line_breakrr%)r�founds  r
rIzScanner.scan_to_next_token�s��(�:��?�?�t�y�y�{�{�h�6�6��L�L�N�N�N����
	��)�)�+�+��$�$��������)�)�+�+��$�$��y�y�{�{�c�!�!��i�i�k�k�)A�A�A��L�L�N�N�N��i�i�k�k�)A�A�A��#�#�%�%�
���1�,0�D�)�����
	�
	�
	�
	�
	rc�6�|���}|���|�|��}d}|dkr*|�|��}|���}n�|dkr*|�|��}|���}nT|���}|���dvr*|���|���dv�*|�|��t||||��S)N�YAML�TAGr�)rgr��scan_directive_name�scan_yaml_directive_value�scan_tag_directive_valuerK�scan_directive_ignored_line�DirectiveToken)rr��name�valuer�s     r
r�zScanner.scan_directives����]�]�_�_�
��������'�'�
�3�3�����6�>�>��2�2�:�>�>�E��}�}���H�H�
�U�]�]��1�1�*�=�=�E��}�}���H�H��}�}���H��)�)�+�+�%=�=�=��������)�)�+�+�%=�=�=��(�(��4�4�4��d�E�:�x�@�@�@rc�P�d}|�|��}d|cxkrdks$nd|cxkrdksnd|cxkrdksn|dvrK|d	z
}|�|��}d|cxkrdk�'nd|cxkrdk�6nd|cxkrdk�En|dv�K|s'td
|d|z|������|�|��}|�|��|���}|dvr'td
|d|z|������|S)
Nr�0�9�A�Z�a�z�-_r�while scanning a directive�6expected alphabetic or numeric character, but found %r� 
…

)rKrrgr�r�)rr��lengthrir�s     r
r�zScanner.scan_directive_name&s�����
�Y�Y�v�
�
���R�����3�����#��"2�"2�"2�"2�s�"2�"2�"2�"2�c�R�6F�6F�6F�6F�3�6F�6F�6F�6F���:�:��a�K�F����6�"�"�B��R�����3�����#��"2�"2�"2�"2�s�"2�"2�"2�"2�c�R�6F�6F�6F�6F�3�6F�6F�6F�6F���:�:��	+��;�Z�L����-�-�/�/�+�+�
+����F�#�#�����V����
�Y�Y�[�[��
�.�.�.��;�Z�L����-�-�/�/�+�+�
+��rc�N�|���dkr,|���|���dk�,|�|��}|���dkr9td|d|���z|������|���|�|��}|���dvr9td|d|���z|������||fS)Nr�r;r�z%expected a digit or '.', but found %rr�z%expected a digit or ' ', but found %r)rKr��scan_yaml_directive_numberrrg)rr��major�minors    r
r�z!Scanner.scan_yaml_directive_value;s���i�i�k�k�S� � ��L�L�N�N�N��i�i�k�k�S� � ��/�/�
�;�;���9�9�;�;�#����;�Z�;�d�i�i�k�k�I��M�M�O�O�%�%�
%�	
�������/�/�
�;�;���9�9�;�;�7�7�7��;�Z�;�d�i�i�k�k�I��M�M�O�O�%�%�
%��u�~�rc��|���}d|cxkrdks)ntd|d|z|������d}d|�|��cxkrdkr*nn'|dz
}d|�|��cxkrdk�%nt|�|����}|�|��|S)Nr�r�r�zexpected a digit, but found %rrr)rKrrg�intr�r�)rr�rir�r�s     r
r�z"Scanner.scan_yaml_directive_numberLs���
�Y�Y�[�[���r� � � � �S� � � � ��;�Z�4�r�9�4�=�=�?�?�L�L�
L����T�Y�Y�v�&�&�-�-�-�-�#�-�-�-�-�-��a�K�F��T�Y�Y�v�&�&�-�-�-�-�#�-�-�-�-��D�K�K��'�'�(�(�����V�����rc�n�|���dkr,|���|���dk�,|�|��}|���dkr,|���|���dk�,|�|��}||fS)Nr�)rKr��scan_tag_directive_handle�scan_tag_directive_prefix)rr��handler�s    r
r�z Scanner.scan_tag_directive_valueYs����i�i�k�k�S� � ��L�L�N�N�N��i�i�k�k�S� � ��/�/�
�;�;���i�i�k�k�S� � ��L�L�N�N�N��i�i�k�k�S� � ��/�/�
�;�;�����rc��|�d|��}|���}|dkr'td|d|z|������|S)N�	directiver�r��expected ' ', but found %r)�scan_tag_handlerKrrg�rr�r�ris    r
r�z!Scanner.scan_tag_directive_handlecs^���$�$�[�*�=�=��
�Y�Y�[�[��
��9�9��;�Z�0�2�5�t�}�}���H�H�
H��rc��|�d|��}|���}|dvr'td|d|z|������|S)Nr�r�r�r�)�scan_tag_urirKrrgr�s    r
r�z!Scanner.scan_tag_directive_prefixlsa���!�!�+�z�:�:��
�Y�Y�[�[��
�.�.�.��;�Z�0�2�5�t�}�}���H�H�
H��rc���|���dkr,|���|���dk�,|���dkr@|���dvr*|���|���dv�*|���}|dvr'td|d|z|������|���dS)Nr�r�r�r��0expected a comment or a line break, but found %r�rKr�rrgr��rr�ris   r
r�z#Scanner.scan_directive_ignored_lineus����i�i�k�k�S� � ��L�L�N�N�N��i�i�k�k�S� � ��9�9�;�;�#����)�)�+�+�%=�=�=��������)�)�+�+�%=�=�=�
�Y�Y�[�[��
�-�-�-��;�Z�F���"�m�m�o�o�/�/�
/�	
�������rc�(�|���}|���}|dkrd}nd}|���d}|�|��}d|cxkrdks$nd|cxkrdksnd	|cxkrd
ksn|dvrK|dz
}|�|��}d|cxkrdk�'nd|cxkrdk�6nd	|cxkrd
k�En|dv�K|s*td
|z|d|z|������|�|��}|�|��|���}|dvr*td
|z|d|z|������|���}||||��S)Nr�alias�anchorrr�r�r�r�r�r�r�rzwhile scanning an %sr�u 	
…

?:,]}%@`)rgrKr�rr�)	rr�r��	indicatorr�r�rir�r�s	         r
r�zScanner.scan_anchor�s���]�]�_�_�
��I�I�K�K�	������D�D��D���������
�Y�Y�v�
�
���R�����3�����#��"2�"2�"2�"2�s�"2�"2�"2�"2�c�R�6F�6F�6F�6F�3�6F�6F�6F�6F���:�:��a�K�F����6�"�"�B��R�����3�����#��"2�"2�"2�"2�s�"2�"2�"2�"2�c�R�6F�6F�6F�6F�3�6F�6F�6F�6F���:�:��	+��5��<�j�L����-�-�/�/�+�+�
+����F�#�#�����V����
�Y�Y�[�[��
�8�8�8��5��<�j�L����-�-�/�/�+�+�
+��=�=�?�?���z�%��X�6�6�6rc�|�|���}|�d��}|dkr�d}|�d��|�d|��}|���dkr9t	d|d|���z|������|���n�|dvrd}d	}|���nvd}d
}|dvr'|d	krd}n|dz
}|�|��}|dv�'d	}|r|�d|��}nd	}|���|�d|��}|���}|dvr't	d
|d|z|������||f}|���}t
|||��S)Nr�<��tagrFzwhile parsing a tagzexpected '>', but found %rr�rDFr�Tzwhile scanning a tagr�)rgrKr�r�rr��TagToken)	rr�rir��suffixr��
use_handler�r�s	         r
r�zScanner.scan_tag�s����]�]�_�_�
�
�Y�Y�q�\�\��
��9�9��F��L�L��O�O�O��&�&�u�j�9�9�F��y�y�{�{�c�!�!�"�#8�*�4�t�y�y�{�{�B��
�
���)�)�)�
�L�L�N�N�N�N�
�.�
.�
.��F��F��L�L�N�N�N�N��F��J��5�5�5���9�9�!%�J���!����Y�Y�v�&�&���5�5�5��F��
��-�-�e�Z�@�@������������&�&�u�j�9�9�F�
�Y�Y�[�[��
�.�.�.��5�z�0�2�5�t�}�}���H�H�
H��� ���=�=�?�?����z�8�4�4�4rc�<�|dkrd}nd}g}|���}|���|�|��\}}|�|��|jdz}|dkrd}|�)|���\}}	}
t
||	��}n ||zdz
}|�|��\}}
d}|j|k�rx|�	��dk�r_|�
|��|�	��dv}
d}|�	|��d	vr|dz
}|�	|��d	v�|�|�|����|�|��|�
��}|�|��\}}
|j|krf|�	��dkrN|r6|d
kr0|
r.|�	��dvr|s|�d��n|�|��nn$|j|kr|�	��dk��_|dur|�|��|dur|�
|��td�|��d||
|��S)NrFTFr�r8� 	rr��
r�)rgr��scan_block_scalar_indicators�scan_block_scalar_ignored_liner#�scan_block_scalar_indentation�max�scan_block_scalar_breaksrrK�extendrxr�r��ScalarToken�join)rr��folded�chunksr��chomping�	increment�
min_indent�breaks�
max_indentr�r#�
line_break�leading_non_spacer�s               r
r�zScanner.scan_block_scalar�s����C�<�<��F�F��F����]�]�_�_�
�	
������"�?�?�
�K�K���)��+�+�J�7�7�7��[��]�
���>�>��J���+/�+M�+M�+O�+O�(�F�J����Z�0�0�F�F��	�)�!�+�F�#�<�<�V�D�D��F�H��
��k�V�#�#��	�	���t�(;�(;��M�M�&�!�!�!� $�	�	���5� 8���F��)�)�F�#�#�+C�C�C��!����)�)�F�#�#�+C�C�C��M�M�$�+�+�f�-�-�.�.�.��L�L�� � � ��-�-�/�/�J�#�<�<�V�D�D��F�H��{�f�$�$�������)<�)<��.�j�D�0�0�-�1�26�)�)�+�+�U�2J�2J�!�+��
�
�c�*�*�*���M�M�*�-�-�-�-��G�k�V�#�#��	�	���t�(;�(;�L�5� � ��M�M�*�%�%�%��t����M�M�&�!�!�!��2�7�7�6�?�?�E�:�x����	rc���d}d}|���}|dvr�|dkrd}nd}|���|���}|dvrMt|��}|dkr$td|d|������|���n�|dvr�t|��}|dkr$td|d|������|���|���}|dvr|dkrd}nd}|���|���}|d	vr'td|d
|z|������||fS)Nz+-�+TF�
0123456789r�while scanning a block scalarz<expected indentation indicator in the range 1-9, but found 0r�z9expected chomping or indentation indicators, but found %r)rKr�r�rrg)rr�rrris     r
rz$Scanner.scan_block_scalar_indicatorss������	�
�Y�Y�[�[��
��:�:��S�y�y���� ���L�L�N�N�N������B��\�!�!���G�G�	���>�>�&�'F�
�Z� �M�M�O�O�-�-�-��������
�<�
�
��B���I��A�~�~�"�#B�J�V��
�
���)�)�)�
�L�L�N�N�N������B��T�z�z���9�9�#�H�H�$�H�������
�Y�Y�[�[��
�.�.�.��>�
�O����-�-�/�/�+�+�
+���"�"rc���|���dkr,|���|���dk�,|���dkr@|���dvr*|���|���dv�*|���}|dvr'td|d|z|������|���dS)Nr�r�r�r'rrrs   r
rz&Scanner.scan_block_scalar_ignored_lineDs����i�i�k�k�S� � ��L�L�N�N�N��i�i�k�k�S� � ��9�9�;�;�#����)�)�+�+�%=�=�=��������)�)�+�+�%=�=�=�
�Y�Y�[�[��
�-�-�-��>�
�F��K��M�M�O�O�%�%�
%�	
�������rc��g}d}|���}|���dvr�|���dkr<|�|�����|���}n&|���|j|kr|j}|���dv��|||fS)Nr� 
…

r�)rgrKrxr�r�r)rrr!r�s    r
rz%Scanner.scan_block_scalar_indentationRs������
��=�=�?�?���i�i�k�k�4�4�4��y�y�{�{�c�!�!��
�
�d�2�2�4�4�5�5�5��=�=�?�?����������;��+�+�!%��J��i�i�k�k�4�4�4��z�8�+�+rc�l�g}|���}|j|krO|���dkr7|���|j|kr|���dk�7|���dvr�|�|�����|���}|j|krO|���dkr7|���|j|kr|���dk�7|���dv��||fS)Nr��

…

)rgrrKr�rxr�)rr#rr�s    r
rz Scanner.scan_block_scalar_breaksas�����=�=�?�?���k�F�"�"�t�y�y�{�{�c�'9�'9��L�L�N�N�N��k�F�"�"�t�y�y�{�{�c�'9�'9��i�i�k�k�3�3�3��M�M�$�.�.�0�0�1�1�1��}�}���H��+��&�&�4�9�9�;�;�#�+=�+=��������+��&�&�4�9�9�;�;�#�+=�+=��i�i�k�k�3�3�3�
�x��rc��|dkrd}nd}g}|���}|���}|���|�|�||����|���|krj|�|�||����|�|�||����|���|k�j|���|���}t
d�|��d|||��S)NrHTFr)rgrKr�r�scan_flow_scalar_non_spaces�scan_flow_scalar_spacesrr)rr��doublerr��quoter�s       r
r�zScanner.scan_flow_scalarns���C�<�<��F�F��F����]�]�_�_�
��	�	�����������
�
�d�6�6�v�z�J�J�K�K�K��i�i�k�k�U�"�"��M�M�$�6�6�v�z�J�J�K�K�K��M�M�$�:�:�6�:�N�N�O�O�O��i�i�k�k�U�"�"�	
�������=�=�?�?���2�7�7�6�?�?�E�:�x����	rr�r8r���b��t�	�nr�v��f��r�
�e�r�rH�\�/�N�…�_� �Lu
�Pu
r
��)�x�u�Uc
��g}	d}|�|��dvr|dz
}|�|��dv�|r=|�|�|����|�|��|���}|sK|dkrE|�d��dkr,|�d��|�d���n�|r|dks|s/|dvr+|�|��|����n�|�r�|dk�r�|���|���}||jvr6|�|j|��|����nU||jvr�|j|}|���t
|��D]U}|�|��d	vr<td
|d||�|��fz|�������Vt|�|��d��}|�t|����|�|��nk|d
vr>|���|�|�
||����n)td
|d|z|������|S���)NTru'"\ 	
…

rrGr
z"\r@�0123456789ABCDEFabcdefz%while scanning a double-quoted scalarz@expected escape sequence of %d hexadecimal numbers, but found %r�r,z!found unknown escape character %r)rKrxr�r��ESCAPE_REPLACEMENTS�ESCAPE_CODES�rangerrgr��chrr�r�scan_flow_scalar_breaks)rr0r�rr�ri�k�codes        r
r.z#Scanner.scan_flow_scalar_non_spaces�s�����&	��F��)�)�F�#�#�+L�L�L��!����)�)�F�#�#�+L�L�L��
%��
�
�d�k�k�&�1�1�2�2�2����V�$�$�$������B��
�b�D�j�j�T�Y�Y�q�\�\�T�-A�-A��
�
�d�#�#�#����Q������
�R�4�Z�Z��Z�B�&�L�L��
�
�b�!�!�!���������
�B�$�J�J��������Y�Y�[�[����1�1�1��M�M�$�":�2�">�?�?�?��L�L�N�N�N�N��4�,�,�,�!�.�r�2�F��L�L�N�N�N�"�6�]�]�Q�Q���9�9�Q�<�<�/G�G�G�".�/V�Xb�$f�)/����1���(>�%?�@D�
�
���#Q�#Q�Q�H��t�{�{�6�2�2�B�7�7�D��M�M�#�d�)�)�,�,�,��L�L��(�(�(�(��1�1�1��(�(�*�*�*��M�M�$�">�">�v�z�"R�"R�S�S�S�S�&�'N�PZ�?�"�D�d�m�m�o�o�W�W�W��
�M&	rc�\�g}d}|�|��dvr|dz
}|�|��dv�|�|��}|�|��|���}|dkr$td|d|������|dvrs|���}|�||��}|dkr|�|��n|s|�d	��|�|��n|�|��|S)
Nrrrr8�while scanning a quoted scalarzfound unexpected end of streamr,rr�)	rKr�r�rrgr�rTrxr)	rr0r�rr��whitespacesrir"r s	         r
r/zScanner.scan_flow_scalar_spaces�s=�������i�i����5�(�(��a�K�F��i�i����5�(�(��k�k�&�)�)�����V����
�Y�Y�[�[��
��:�:��?��4�d�m�m�o�o�G�G�
G�
�)�
)�
)��-�-�/�/�J��1�1�&�*�E�E�F��T�!�!��
�
�j�)�)�)�)��
#��
�
�c�"�"�"��M�M�&�!�!�!�!��M�M�+�&�&�&��
rc���g}	|�d��}|dks|dkr;|�d��dvr$td|d|������|���dvr*|���|���dv�*|���d	vr(|�|�����n|S��)
NTr�r�r�r�rXz#found unexpected document separatorrr,)r�rKrrgr�rxr�)rr0r�rr�s     r
rTzScanner.scan_flow_scalar_breaks�s�����
	��[�[��^�^�F��%���6�U�?�?��	�	�!���(C�C�C�"�#C�Z�=�t�}�}���P�P�P��)�)�+�+��&�&��������)�)�+�+��&�&��y�y�{�{�4�4�4��
�
�d�2�2�4�4�5�5�5�5��
�
	rc���g}|���}|}|jdz}g}	d}|���dkr�n	|�|��}|dvs7|dkr&|�|dz��d|jrdndzvs|jr|d	vrn|dz
}�W|dkrn�d
|_|�|��|�|�|����|�|��|���}|�	||��}|r*|���dks|js|j
|krn��-td�|��d||��S)NrTrr�r�rBz,[]{}rz,?[]{}F)
rgr#rKrr%rrxr�r��scan_plain_spacesrrr)rrr�r�r#�spacesr�ris        r
r�zScanner.scan_plain�s������]�]�_�_�
�����Q���
��	��F��y�y�{�{�c�!�!��
��Y�Y�v�&�&���4�4�4��#�I�I� $�	�	�&��(� 3� 3�7R�59�_�)M���#�8O�!O�!O� �O�!O�02�h�����!���
���{�{��$)�D�!��M�M�&�!�!�!��M�M�$�+�+�f�-�-�.�.�.��L�L�� � � ��}�}���H��+�+�F�J�?�?�F��
�T�Y�Y�[�[�C�/�/� �O�0�04��f�0D�0D��/	�0�2�7�7�6�?�?�D�*�h�G�G�Grc���g}d}|�|��dvr|dz
}|�|��dv�|�|��}|�|��|���}|dv�rZ|���}d|_|�d��}|dks|dkr|�d��d	vrdSg}	|���d
vr�|���dkr|���na|	�|�����|�d��}|dks|dkr|�d��d	vrdS|���d
v��|dkr|�|��n|	s|�d��|�|	��n|r|�|��|S)Nrr�rr,Tr�r�r�r�r*r)rKr�r�r�r%rxr)
rr#r�rr�rYrir"r�r s
          r
r\zScanner.scan_plain_spacess��������i�i����3�&�&��a�K�F��i�i����3�&�&��k�k�&�)�)�����V����
�Y�Y�[�[��
�'�'�'��-�-�/�/�J�$(�D�!��[�[��^�^�F��%���6�U�?�?��	�	�!���(C�C�C����F��)�)�+�+�!8�8�8��9�9�;�;�#�%�%��L�L�N�N�N�N��M�M�$�"6�"6�"8�"8�9�9�9�!�[�[��^�^�F��%���6�U�?�?� $�	�	�!���0K� K� K����)�)�+�+�!8�8�8��T�!�!��
�
�j�)�)�)�)��
#��
�
�c�"�"�"��M�M�&�!�!�!�!�
�	'��M�M�+�&�&�&��
rc��|���}|dkr*td|z|d|z|������d}|�|��}|dkr�d|cxkrdks$nd|cxkrd	ksnd
|cxkrdksn|dvrK|dz
}|�|��}d|cxkrdk�'nd|cxkrd	k�6nd
|cxkrdk�En|dv�K|dkr?|�|��td|z|d|z|������|dz
}|�|��}|�|��|S)
NrD�while scanning a %szexpected '!', but found %rrr�r�r�r�r�r�r�r�)rKrrgr�r�)rr�r�rir�r�s      r
r�zScanner.scan_tag_handleDs����Y�Y�[�[��
��9�9��4�t�;�Z�0�2�5�t�}�}���H�H�
H���
�Y�Y�v�
�
��
��9�9���"�"�"�"�s�"�"�"�"�c�R�&6�&6�&6�&6�3�&6�&6�&6�&6�#��:J�:J�:J�:J�s�:J�:J�:J�:J��T�z�z��!����Y�Y�v�&�&����"�"�"�"�s�"�"�"�"�c�R�&6�&6�&6�&6�3�&6�&6�&6�&6�#��:J�:J�:J�:J�s�:J�:J�:J�:J��T�z�z��S�y�y����V�$�$�$�"�#8�4�#?��4�r�9�4�=�=�?�?�L�L�L��a�K�F����F�#�#�����V�����rc��g}d}|�|��}d|cxkrdks$nd|cxkrdksnd|cxkrdksn|dvr�|d	kri|�|�|����|�|��d}|�|�||����n|d
z
}|�|��}d|cxkrdk��nd|cxkrdk��nd|cxkrdk��n|dv��|r?|�|�|����|�|��d}|s*td|z|d|z|������d
�|��S)Nrr�r�r�r�r�r�z-;/?:@&=+$,_.!~*'()[]%r9rzwhile parsing a %szexpected URI, but found %rr)rKrxr�r��scan_uri_escapesrrgr)rr�r�rr�ris      r
r�zScanner.scan_tag_uri\s�������
�Y�Y�v�
�
���R�����3�����#��"2�"2�"2�"2�s�"2�"2�"2�"2�c�R�6F�6F�6F�6F�3�6F�6F�6F�6F��2�2�2��S�y�y��
�
�d�k�k�&�1�1�2�2�2����V�$�$�$����
�
�d�3�3�D�*�E�E�F�F�F�F��!������6�"�"�B��R�����3�����#��"2�"2�"2�"2�s�"2�"2�"2�"2�c�R�6F�6F�6F�6F�3�6F�6F�6F�6F��2�2�2��	��M�M�$�+�+�f�-�-�.�.�.��L�L�� � � ��F��	H��3�d�:�J�0�2�5�t�}�}���H�H�
H��w�w�v���rc	���g}|���}|���dkr�|���td��D]V}|�|��dvr=t	d|z|d|�|��z|�������W|�t
|�d��d����|�d��|���dk��	t|���	d��}n4#t$r'}t	d|z|t|��|���d}~wwxYw|S)Nr9r
rNr`zCexpected URI escape sequence of 2 hexadecimal numbers, but found %rrOzutf-8)rgrKr�rRrrxr�r��bytes�decode�UnicodeDecodeError�str)rr�r��codesrrUr��excs        r
rbzScanner.scan_uri_escapesusW�����}�}�����i�i�k�k�S� � ��L�L�N�N�N��1�X�X�
=�
=���9�9�Q�<�<�'?�?�?�&�'<�t�'C�Z�a�"�i�i��l�l�+�,0�M�M�O�O�=�=�=�@�
�L�L��T�[�[��^�^�R�0�0�1�1�1��L�L��O�O�O��i�i�k�k�S� � �	Y��%�L�L�'�'��0�0�E�E��!�	Y�	Y�	Y��4�t�;�Z��S���SW�X�X�X�����	Y�����s�
"D0�0
E!�:"E�E!c���|���}|dvrE|�d��dkr|�d��n|���dS|dvr|���|SdS)Nu
…r
z
ru

r)rKr�r�rhs  r
r�zScanner.scan_line_break�sv���Y�Y�[�[��
�����{�{�1�~�~��'�'����Q������������4�
�>�
!�
!��L�L�N�N�N��I��rrN)Lrr	r
rr.r0r3r)r*r6r5rursrJr{r!rLrNrPrRr�rSrTr�rUrVr�rWrYr[r]r^r_r`rarbr�rcrdr�rfrMrOrQrXrZr\rerIr�r�r�r�r�r�r�r�r�r�r�rrrrr�rPrQr.r/rTr�r\r�r�rbr�rrr
rr.s\������='�='�='�B
�
�
����&�&�&�	�	�	�h!�h!�h!�X
 �
 �
 �5�5�5� =�=�=�"	;�	;�	;�:�:�:�0���	%�	%�	%����&
2�
2�
2�:�:�:�8�8�8�=�=�=� A�A�A�@�@�@�=�=�=�"=�=�=�<�<�<�=�=�=�"A�A�A�B�B�B�B;�;�;�86=�6=�6=�p	9�	9�	9�	:�	:�	:�	,�	,�	,�+�+�+�+�+�+�	:�	:�	:�+�+�+�*�*�*�	9�	9�	9�.�.�.����������;�;�;�
?�?�?�?�?�?�Q�Q�Q�*!�!�!�FA�A�A�&���*���"��� � � ����������"7�"7�"7�H'5�'5�'5�RJ�J�J�X&#�&#�&#�P���
,�
,�
,� � � ����0�������	���	��	�
	
���	��
�	���	���	���	���	���	
���	
���	���	��� 	��!�"	��#�$	��%���,�����L�)�)�)�V���0���$'H�'H�'H�R#�#�#�J���0���2���&����rN)�__all__�errorrr rrrrrr
�<module>rms���6�n�
%��"�"�"�"�"�"�����	�	�	�	�	�?�	�	�	�	�	�	�	�	�	�	�	�m�m�m�m�m�m�m�m�m�mr