AlkantarClanX12

Your IP : 3.17.155.142


Current Path : /opt/alt/python38/lib64/python3.8/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/__pycache__/shlex.cpython-38.opt-2.pyc

U

i�f
4�	@s�ddlZddlZddlZddlmZddlmZddddgZGdd�d�Zddd�Z	dd�Z
e�d
ej�j
Zdd�Zdd�Zedkr�eej�dkr�ee��n,ejdZee��Zeeee��W5QRXdS)�N)�deque)�StringIO�shlex�split�quote�joinc@sneZdZddd�Zedd��Zdd�Zdd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zddd�Zdd�Z
dd�ZdS)rNFcCst|t�rt|�}|dk	r(||_||_ntj|_d|_||_|rHd|_nd|_d|_	d|_
|jrn|j
d7_
d|_d|_d|_
d|_d	|_d
|_t�|_d|_d|_d|_t�|_d|_|s�d}n|d
kr�d}||_|�rt�|_|j
d7_
|j
�t�|��}|j
�|�|_
dS)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/python38/lib64/python3.8/shlex.py�__init__sJ
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_tokencCspt|t�rt|�}|j�|j|j|jf�||_||_d|_|jrl|dk	r\t	d|jf�nt	d|jf�dS)Nr
zshlex: pushing to file %szshlex: pushing to stream %s)
rrrr"r4rrrr r2)r*�	newstream�newfiler-r-r.�push_sourceNs
zshlex.push_sourcecCsD|j��|j��\|_|_|_|jr:td|j|jf�d|_dS)Nzshlex: popping to %s, line %dr)	r�closer"�popleftrrr r2rr1r-r-r.�
pop_source\s

�zshlex.pop_sourcecCs�|jr.|j��}|jdkr*tdt|��|S|��}|jdk	rz||jkrz|�|���}|rp|\}}|�||�|�	�}q@||j
kr�|js�|j
S|��|�	�}qz|jdkr�||j
kr�tdt|��ntd�|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?es.








zshlex.get_tokencCs�d}d}|jr |jr |j��}n|j�d�}|dkrB|jd7_|jdkr^td|j|f�|jdkrtd|_	�q�q|jdk�r�|s�d|_�q��q�||j
kr�|jdkr�td	�|j	s�|jr|r�q�nqn�||jkr�|j�
�|jd7_n�|j�r||jk�rd
}||_n�||jk�r&||_	d
|_nr||jk�r@||_	d|_nX||jk�rb|j�sZ||_	||_n6|j�rx||_	d
|_n ||_	|j	�s�|jr|r�q�nqq|j|jk�rDd}|�s�|jdk�r�td
�td��||jk�r|j�s�|j	|7_	d|_�q�nd
|_n>|j�r4||jk�r4|j|jk�r4|j}||_n|j	|7_	q|j|jk�r�|�st|jdk�rltd�td��||jk�r�||jk�r�||k�r�|j	|j7_	|j	|7_	||_q|jdkr|�s�d|_�q�q||j
k�r|jdk�r�td�d|_|j	�s�|jr|r�q�nqq||jk�rh|j�
�|jd7_|j�r�d|_|j	�s�|jr|r�q�nqq|jdk�r�||jk�r�|j	|7_	n"||j
k�r�|j�|�d|_�q�q|j�r�||jk�r�||_q|j�r�||jk�r�d
}||_q||jk�s||jk�s|j�r,||jk�r,|j	|7_	q|j�rB|j�|�n|j�|�|jdk�rbtd�d|_|j	�s�|jr|r�q�qqq|j	}d|_	|j�r�|�s�|dk�r�d}|jdk�r�|�r�tdt|��ntd�|S)NFrr
�
�z&shlex: in state %r I see character: %rr�z+shlex: I see whitespace in whitespace state�a�cTz 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_tokencCsV|ddkr|dd�}t|jt�rHtj�|�sHtj�tj�|j�|�}|t|d�fS)Nrrr
����r)	rrr�os�path�isabsr�dirname�open)r*r8r-r-r.r>s
zshlex.sourcehookcCs(|dkr|j}|dkr|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__)NNFF)N)NN)�__name__�
__module__�__qualname__r/�propertyr+r6r9r<r?r=r>rTrUrWr-r-r-r.rs�
/

	 	
FTcCs$t||d�}d|_|sd|_t|�S)N)rTr)rrr�list)�sZcommentsrZlexr-r-r.r1s
cCsd�dd�|D��S)Nrcss|]}t|�VqdSr0)r)�.0�argr-r-r.�	<genexpr><szjoin.<locals>.<genexpr>)r)Z
split_commandr-r-r.r:sz[^\w@%+=:,./-]cCs,|sdSt|�dkr|Sd|�dd�dS)Nz''�'z'"'"')�_find_unsafe�replace)r]r-r-r.rAs
cCs$|��}|sq tdt|��qdS)NzToken: )r?r2r3)ZlexerZttr-r-r.�
_print_tokensMsrd�__main__r
)FT)rO�rer�collectionsr�ior�__all__rrr�compile�ASCII�searchrbrrdrX�len�argv�fnrS�fr-r-r-r.�<module>
s&