ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/shlex.cpython-311.opt-2.pyc

�

�f�4���	ddlZddlZddlZddlmZddlmZgd�ZGd�d��Zdd	�Z	d
�Z
ejdej��j
Zd�Zd
�Zedkrqeej��dkree����dSejdZee��5Zeeee����ddd��dS#1swxYwYdSdS)�N)�deque)�StringIO)�shlex�split�quote�joinc�l�eZdZ			dd�Zed���Zd�Zdd�Zd�Zd�Z	d	�Z
d
�Zdd�Zd�Z
d
�ZdS)rNFc��t|t��rt|��}|�||_||_nt
j|_d|_||_|rd|_nd|_d|_	d|_
|jr|xj
dz
c_
d|_d|_d|_
d|_d	|_d
|_t#��|_d|_d|_d|_t#��|_d|_|sd}n|d
urd}||_|rvt#��|_|xj
dz
c_
|j
�t6�|����}|j
�|��|_
dSdS)N��#�?abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_u|ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞz 	
Fz'"�\�"� �rTz();<>|&z~-./*?=)�
isinstance�strr�instream�infile�sys�stdin�posix�eof�
commenters�	wordchars�
whitespace�whitespace_split�quotes�escape�
escapedquotes�stater�pushback�lineno�debug�token�	filestack�source�_punctuation_chars�_pushback_chars�	maketrans�dict�fromkeys�	translate)�selfrrr�punctuation_chars�ts      �,/opt/alt/python311/lib64/python3.11/shlex.py�__init__zshlex.__init__s����h��$�$�	*���)�)�H���$�D�M� �D�K�K��I�D�M��D�K���
��	��D�H�H��D�H����B����:�	_��N�N� ^�
_�N�N�#��� %��������� �����
�����
������
���
��������� �	*� "���
�$�
&�
&� )��"3����	9�#(�7�7�D� ��N�N�i�'�N�N���(�(����7H�)I�)I�J�J�A�!�^�5�5�a�8�8�D�N�N�N�	9�	9�c��|jS�N)r(�r.s r1r/zshlex.punctuation_charsDs���&�&r3c��	|jdkrtdt|��z��|j�|��dS)Nrzshlex: pushing token )r$�print�reprr"�
appendleft)r.�toks  r1�
push_tokenzshlex.push_tokenHsF��D��:��?�?��)�D��I�I�5�6�6�6��
� � ��%�%�%�%�%r3c�H�	t|t��rt|��}|j�|j|j|jf��||_||_d|_|jr4|�td|j����dStd|j����dSdS)Nrzshlex: pushing to file zshlex: pushing to stream )
rrrr&r:rrr#r$r8)r.�	newstream�newfiles   r1�push_sourcezshlex.push_sourceNs���C��i��%�%�	,� ��+�+�I���!�!�4�;��
�t�{�"K�L�L�L����!��
�����:�	H��"���T�[�[�B�C�C�C�C�C���t�}�}�F�G�G�G�G�G�		H�	Hr3c���	|j���|j���\|_|_|_|jrtd|j|jfz��d|_dS)Nzshlex: popping to %s, line %dr)	r�closer&�popleftrr#r$r8r!r6s r1�
pop_sourcezshlex.pop_source\st��%��
������48�N�4J�4J�4L�4L�1���d�m�T�[��:�	2��1��]�D�K�0�1�
2�
2�
2���
�
�
r3c���	|jrE|j���}|jdkrtdt	|��z��|S|���}|j�n||jkrc|�|�����}|r|\}}|�||��|�	��}||jk�c||j
krA|js|j
S|���|�	��}||j
k�A|jdkr:||j
kr tdt	|��z��ntd��|S)Nrzshlex: popping token z
shlex: token=zshlex: token=EOF)
r"rCr$r8r9�
read_tokenr'�
sourcehookr@�	get_tokenrr&rD)r.r;�raw�specr?r>s      r1rHzshlex.get_tokenesc��L��=�	��-�'�'�)�)�C��z�Q����-��S�	�	�9�:�:�:��J��o�o�����;�"����$�$����t���'8�'8�9�9���9�+/�(�W�i��$�$�Y��8�8�8��n�n�&�&�����$�$��T�X�o�o��>�
'��x�����!�!�!��n�n�&�&���T�X�o�o��:��?�?��d�h����o��S�	�	�1�2�2�2�2��(�)�)�)��
r3c�"
�d}d}	|jr!|jr|j���}n|j�d��}|dkr|xjdz
c_|jdkrtd|j�d|����|j�	d	|_	�n!|jdk�r|s	d|_�n
||j
vr-|jd
krtd��|j	s	|jr|r�nՌ�||jvr+|j�
��|xjdz
c_�n�|jr||jvrd}||_�n�||jvr||_	d|_�nj||jvr||_	d
|_�nQ||jvr|js||_	||_�n1|jr||_	d|_�n||_	|j	s	|jr|r�n���|j|jvr�d}|s)|jd
krtd��t%d���||jkr)|js|xj	|z
c_	d|_�n�d|_�n�|jr'||jvr|j|jvr|j}||_�nb|xj	|z
c_	�nP|j|jvrs|s)|jd
krtd��t%d���||jvr&||jkr||kr|xj	|jz
c_	|xj	|z
c_	||_�n�|jdv�r�|s	d|_�n�||j
vr5|jd
krtd��d|_|j	s	|jr|r�n���1||jvrM|j�
��|xjdz
c_|jrd|_|j	s	|jr|r�n,����n&|jd
krF||jvr|xj	|z
c_	�n||j
vr|j�|��d|_n�|jr||jvr||_n�|jr||jvr
d}||_n�||jvs||jvs|jr||jvr|xj	|z
c_	np|jr|j�|��n|j�|��|jd
krtd��d|_|j	s	|jr|rn������|j	}d	|_	|jr
|s|d	krd}|jdkr1|r tdt/|��z��ntd��|S)NFrTr�
�zshlex: in state z I see character: r�z+shlex: I see whitespace in whitespace state�a�cz shlex: I see EOF in quotes statezNo closing quotationz shlex: I see EOF in escape statezNo escaped character)rOrPz%shlex: I see whitespace in word statez&shlex: I see punctuation in word statezshlex: raw token=zshlex: raw token=EOF)r/r)�popr�readr#r$r8r!r%rrr�readlinerrrr�
ValueErrorr �appendr"r:r9)r.�quoted�escapedstate�nextchar�results     r1rFzshlex.read_token�s"������C	!��%�
1�$�*>�
1��/�3�3�5�5����=�-�-�a�0�0���4������q� ����z�Q�����$�*�*�*�BJ�(�L�M�M�M��z�!���
����s�"�"��"!�!%�D�J�����0�0��z�Q����K�L�L�L��z�!�d�j�!�V�!�� ����0�0��M�*�*�,�,�,��K�K�1�$�K�K�K��Z�!�H���$;�$;�#&�L�!)�D�J�J����/�/�!)�D�J�!$�D�J�J���!7�7�7�!)�D�J�!$�D�J�J����,�,��:�.�%-��
�!)�D�J�J��*�!�!)�D�J�!$�D�J�J�!)�D�J��z�!�d�j�!�V�!�� ���t�{�*�*����=��z�Q����@�A�A�A�$�%;�<�<�<��t�z�)�)��:�)��
�
�h�.�
�
�%(��
��%(��
�
��j�+�X���%<�%<����+�B,�B,�#'�:�L�!)�D�J�J��J�J�(�*�J�J�J���t�{�*�*��=��z�Q����@�A�A�A�$�%;�<�<�<�!�D�K�/�/� �D�J�.�.�8�|�3K�3K��J�J�$�*�,�J�J��
�
�h�&�
�
�)��
�
���z�)�)��0!�!%�D�J�����0�0��z�Q����E�F�F�F�!$�D�J��z�!�d�j�!�V�!�� ����0�0��M�*�*�,�,�,��K�K�1�$�K�K��z�%�%(��
��:�%�$�*�%��%�!�$�%��Z�3�&�&��4�#9�9�9��
�
�h�.�
�
�
�#�4�?�:�:� �0�7�7��A�A�A�%(��
���Z�!�H���$;�$;�!)�D�J�J��Z�!�H���$;�$;�#&�L�!)�D�J�J��$�.�0�0�H���4K�4K��/�5L�"�$�*@�@�@��J�J�(�*�J�J�J��-�;��,�3�3�H�=�=�=�=��
�0�0��:�:�:��z�Q����F�G�G�G�!$�D�J��z�!�d�j�!�V�!�� �GC	!�H�����
��:�	�f�	��2����F��:��>�>��
.��)�D��L�L�8�9�9�9�9��,�-�-�-��
r3c�J�	|ddkr
|dd�}t|jt��ratj�|��sBtj�tj�|j��|��}|t|d��fS)Nrrr����r)	rrr�os�path�isabsr�dirname�open)r.r?s  r1rGzshlex.sourcehooks���2��1�:�����a��d�m�G��d�k�3�'�'�	J���
�
�g�0F�0F�	J��g�l�l�2�7�?�?�4�;�#?�#?��I�I�G���g�s�+�+�,�,r3c�6�	|�|j}|�|j}d||fzS)Nz"%s", line %d: )rr#)r.rr#s   r1�error_leaderzshlex.error_leader s-��F��>��[�F��>��[�F�"�f�f�%5�5�5r3c��|Sr5�r6s r1�__iter__zshlex.__iter__(s���r3c�R�|���}||jkrt�|Sr5)rHr�
StopIteration)r.r%s  r1�__next__zshlex.__next__+s)����� � ���D�H������r3)NNFFr5)NN)�__name__�
__module__�__qualname__r2�propertyr/r<r@rDrHrFrGrcrfrirer3r1rrs�������>�9>�#(�-9�-9�-9�-9�^�'�'��X�'�&�&�&�H�H�H�H�������@P�P�P�d-�-�-�6�6�6�6��������r3rFTc��	|�!ddl}|�dtd���t||���}d|_|sd|_t
|��S)Nrz4Passing None for 's' to shlex.split() is deprecated.rN)�
stacklevel)rTr)�warnings�warn�DeprecationWarningrrr�list)�s�commentsrrp�lexs     r1rr1sk��7��y������
�
�L�(�Q�	�	8�	8�	8�
���
�
�
�C��C���������9�9�r3c�B�	d�d�|D����S)Nrc3�4K�|]}t|��V��dSr5)r)�.0�args  r1�	<genexpr>zjoin.<locals>.<genexpr>@s(����8�8�3�E�#�J�J�8�8�8�8�8�8r3)r)�
split_commands r1rr>s&��=��8�8�8�8�-�8�8�8�8�8�8r3z[^\w@%+=:,./-]c�f�	|sdSt|���|Sd|�dd��zdzS)Nz''�'z'"'"')�_find_unsafe�replace)rts r1rrEsC��;����t��A����������3�	�*�*�*�S�0�0r3c�t�	|���}|sdStdt|��z���8)NrzToken: )rHr8r9)�lexer�tts  r1�
_print_tokensr�QsA��$�
�_�_�
�
���	��E�
�i�$�r�(�(�"�#�#�#�	$r3�__main__r)FT)r]�rer�collectionsr�ior�__all__rrr�compile�ASCII�searchrrr�rj�len�argv�fnra�frer3r1�<module>r�s���>�
�	�	�	�	�	�	�	�
�
�
�
�������������
-�
-�
-��\�\�\�\�\�\�\�\�|
�
�
�
�9�9�9�
�r�z�+�R�X�6�6�=��	1�	1�	1�$�$�$��z���
�s�3�8�}�}�����
�e�e�g�g������
�X�a�[��
�T�"�X�X�	(���M�%�%��2�,�,�'�'�'�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�	(�	(��s�B=�=C�C

Zerion Mini Shell 1.0