AlkantarClanX12

Your IP : 18.117.75.6


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/shlex.cpython-310.opt-2.pyc

o

6��f�4�@s�	ddlZddlZddlZddlmZddlmZgd�ZGdd�d�Zdd	d
�Z	dd�Z
e�d
ej�j
Zdd�Zdd�Zedkrreej�dkrOee��dSejdZee��Zeeee��Wd�dS1skwYdSdS)�N)�deque)�StringIO)�shlex�split�quote�joinc@steZdZ			ddd�Zedd��Zdd�Zdd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zddd�Zdd�Z
dd�ZdS)rNFcCst|t�r	t|�}|dur||_||_ntj|_d|_||_|r$d|_nd|_d|_	d|_
|jr7|j
d7_
d|_d|_d|_
d|_d	|_d
|_t�|_d|_d|_d|_t�|_d|_|sbd}n|d
urhd}||_|r�t�|_|j
d7_
|j
�t�|��}|j
�|�|_
dSdS)N��#Z?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�t�r-�,/opt/alt/python310/lib64/python3.10/shlex.py�__init__sL
�zshlex.__init__cCs|jS�N)r$�r*r-r-r.r+Dszshlex.punctuation_charscCs,	|jdkrtdt|��|j�|�dS)Nr
zshlex: pushing token )r �print�reprr�
appendleft)r*�tokr-r-r.�
push_tokenHs
zshlex.push_tokencCsx	t|t�r
t|�}|j�|j|j|jf�||_||_d|_|jr:|dur0t	d|jf�dSt	d|jf�dSdS)Nr
zshlex: pushing to file %szshlex: pushing to stream %s)
rrrr"r4rrrr r2)r*�	newstream�newfiler-r-r.�push_sourceNs
�zshlex.push_sourcecCsF	|j��|j��\|_|_|_|jrtd|j|jf�d|_dS)Nzshlex: popping to %s, line %dr)	r�closer"�popleftrrr r2rr1r-r-r.�
pop_source\s

�
zshlex.pop_sourcecCs�	|jr|j��}|jdkrtdt|��|S|��}|jdurB||jkrB|�|���}|r9|\}}|�||�|�	�}||jks&||j
krZ|jsM|j
S|��|�	�}||j
ksG|jdkrr||j
krntdt|��|Std�|S)Nr
zshlex: popping token z
shlex: token=zshlex: token=EOF)
rr;r r2r3�
read_tokenr#�
sourcehookr9�	get_tokenrr"r<)r*r5�raw�specr8r7r-r-r.r?es6




�

�

�zshlex.get_tokencCs�d}d}	|jr|jr|j��}n|j�d�}|dkr"|jd7_|jdkr0td|j|f�|jdur:d|_	�n�|jdkr�|sFd|_�n�||j
vr_|jd	krTtd
�|j	s\|jr^|r^�n�q||jvrr|j�
�|jd7_�n�|jr�||jvr�d}||_�n�||jvr�||_	d|_�n�||jvr�||_	d|_�n�||jvr�|js�||_	||_�n�|jr�||_	d|_�n|||_	|j	s�|jr�|rÐnpq|j|jv�rd}|s�|jd	kr�td
�td��||jkr�|js�|j	|7_	d|_�nCd|_�n=|j�r||jv�r|j|jv�r|j}||_�n$|j	|7_	�n|j|jv�rS|�s/|jd	k�r+td�td��||jv�rH||jk�rH||k�rH|j	|j7_	|j	|7_	||_n�|jdv�r2|�s`d|_n�||j
v�r�|jd	k�rptd�d|_|j	�s~|j�r|�rn�q||jv�r�|j�
�|jd7_|j�r�d|_|j	�s�|j�r�|�r�n�qn�|jdk�r�||jv�r�|j	|7_	nw||j
v�r�|j�|�d|_nh|j�r�||jv�r�||_nY|j�r�||jv�r�d}||_nI||jv�s�||jv�s�|j�r||jv�r|j	|7_	n+|j�r|j�|�n|j�|�|jd	k�r"td�d|_|j	�s0|j�r1|�r1nqq|j	}d|_	|j�rG|�sG|dk�rGd}|jdk�r^|�rZtdt|��|Std�|S)NFrTr
�
�z&shlex: in state %r I see character: %rr�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)rErFz%shlex: I see whitespace in word statez&shlex: I see punctuation in word statezshlex: raw token=zshlex: raw token=EOF)r+r%�popr�readrr r2rr!rrr�readlinerrrr�
ValueErrorr�appendrr4r3)r*ZquotedZescapedstateZnextchar�resultr-r-r.r=�s
�
















�

�����zshlex.read_tokencCsX	|ddkr
|dd�}t|jt�r%tj�|�s%tj�tj�|j�|�}|t|d�fS)Nrrr
����r)	rrr�os�path�isabsr�dirname�open)r*r8r-r-r.r>szshlex.sourcehookcCs*	|dur|j}|dur|j}d||fS)Nz"%s", line %d: )rr)r*rrr-r-r.�error_leader szshlex.error_leadercCs|Sr0r-r1r-r-r.�__iter__(szshlex.__iter__cCs|��}||jkrt�|Sr0)r?r�
StopIteration)r*r!r-r-r.�__next__+s
zshlex.__next__)NNFFr0)NN)�__name__�
__module__�__qualname__r/�propertyr+r6r9r<r?r=r>rTrUrWr-r-r-r.rs"
�/

	 
	rFTcCsF	|durddl}|jdtdd�t||d�}d|_|sd|_t|�S)Nrz4Passing None for 's' to shlex.split() is deprecated.rD)�
stacklevel)rTr)�warnings�warn�DeprecationWarningrrr�list)�sZcommentsrr]Zlexr-r-r.r1s�rcCs	d�dd�|D��S)Nrcss�|]}t|�VqdSr0)r)�.0�argr-r-r.�	<genexpr>@s�zjoin.<locals>.<genexpr>)r)Z
split_commandr-r-r.r>srz[^\w@%+=:,./-]cCs.	|sdSt|�dur
|Sd|�dd�dS)Nz''�'z'"'"')�_find_unsafe�replace)rar-r-r.rEsrcCs$	|��}|s	dStdt|��q)Nr
zToken: )r?r2r3)ZlexerZttr-r-r.�
_print_tokensQs�rh�__main__r
)FT)rO�rer�collectionsr�ior�__all__rrr�compile�ASCII�searchrfrrhrX�len�argv�fnrS�fr-r-r-r.�<module>s.	
 


"��