AlkantarClanX12

Your IP : 3.139.239.157


Current Path : /proc/self/root/lib64/python3.6/__pycache__/
Upload File :
Current File : //proc/self/root/lib64/python3.6/__pycache__/shlex.cpython-36.opt-2.pyc

3


 \�2�@s�ddlZddlZddlZddlmZddlmZdddgZGdd�d�Zdd
d�Z	ej
dej�jZ
dd�Zd
d�Zedkr�eej�dkr�ee��n,ejdZee��Zeeee��WdQRXdS)�N)�deque)�StringIO�shlex�split�quotec@sbeZdZddd�Zdd�Zddd�Zd	d
�Zdd�Zd
d�Zdd�Z	ddd�Z
dd�Zdd�ZdS)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
jtj|��}|j
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)�selfrrrr#�t�r+�/usr/lib64/python3.6/shlex.py�__init__sJ
zshlex.__init__cCs*|jdkrtdt|��|jj|�dS)Nrzshlex: pushing token )r�print�reprr�
appendleft)r)�tokr+r+r,�
push_tokenDs
zshlex.push_tokencCspt|t�rt|�}|jj|j|j|jf�||_||_d|_|jrl|dk	r\t	d|jf�nt	d|jf�dS)Nrzshlex: pushing to file %szshlex: pushing to stream %s)
r
rrr!r0rrrrr.)r)�	newstream�newfiler+r+r,�push_sourceJs
zshlex.push_sourcecCsD|jj�|jj�\|_|_|_|jr:td|j|jf�d|_dS)Nzshlex: popping to %s, line %dr)	r�closer!�popleftrrrr.r)r)r+r+r,�
pop_sourceXs
zshlex.pop_sourcecCs�|jr.|jj�}|jdkr*tdt|��|S|j�}|jdk	r~x<||jkr||j|j��}|rr|\}}|j||�|j	�}qBWx*||j
kr�|js�|j
S|j�|j	�}q�W|jdkr�||j
kr�tdt|��ntd�|S)Nrzshlex: popping token z
shlex: token=zshlex: token=EOF)
rr7rr.r/�
read_tokenr"�
sourcehookr5�	get_tokenrr!r8)r)r1�raw�specr4r3r+r+r,r;as.




zshlex.get_tokencCs�d}d}�x\|jr$|jr$|jj�}n|jjd�}|dkrF|jd7_|jdkrbtd|j|f�|jdkrvd|_	Pq|jdk�r�|s�d|_P�qd||j
kr�|jdkr�td	�|j	s�|jr|rPnqn�||jkr�|jj
�|jd7_n�|jo�||jk�rd
}||_n�||jk�r"||_	d
|_np||jk�r<||_	d|_nV||jk�r^|j�sV||_	||_n4|j�rt||_	d
|_n||_	|j	�s�|jr|rPnqq|j|jk�r<d}|�s�|jdk�r�td
�td��||jk�r�|j�s�|j	|7_	d|_Pnd
|_n>|j�r,||jk�r,|j|jk�r,|j}||_n|j	|7_	q|j|jk�r�|�sl|jdk�rdtd�td��||jk�r�||jk�r�||k�r�|j	|j7_	|j	|7_	||_q|jdkr|�s�d|_Pq||j
k�r|jdk�r�td�d|_|j	�s|jr|rPnqq||jk�rZ|jj
�|jd7_|j�rdd|_|j	�sR|jr|rPnqq|jdk�r�||jk�r�|j	|7_	n ||j
k�r�|jj|�d|_Pq|j�r�||jk�r�||_q|j�r�||jk�r�d
}||_q||jk�s||jk�s|j�r|j	|7_	q|j�r&|jj|�n|jj|�|jdk�rFtd�d|_|j	�s^|jr|rPqqqW|j	}d|_	|j�r�|�r�|dk�r�d}|jdk�r�|�r�tdt|��ntd�|S)NFrr�
�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 characterz%shlex: I see whitespace in word statez&shlex: I see punctuation in word statezshlex: raw token=zshlex: raw token=EOF)rArB)r#r$�popr�readrrr.rr rrr�readlinerrrr�
ValueErrorr�appendrr0r/)r)ZquotedZescapedstateZnextchar�resultr+r+r,r9�s�









zshlex.read_tokencCsX|ddkr|dd�}t|jt�rJtjj|�rJtjjtjj|j�|�}|t|d�fS)Nrr
r�r���)	r
rr�os�path�isabs�join�dirname�open)r)r4r+r+r,r:s
zshlex.sourcehookcCs(|dkr|j}|dkr|j}d||fS)Nz"%s", line %d: )rr)r)rrr+r+r,�error_leaders
zshlex.error_leadercCs|S)Nr+)r)r+r+r,�__iter__#szshlex.__iter__cCs|j�}||jkrt�|S)N)r;r�
StopIteration)r)r r+r+r,�__next__&s
zshlex.__next__)NNFF)N)NN)
�__name__�
__module__�__qualname__r-r2r5r8r;r9r:rQrRrTr+r+r+r,rs
.
	 	
FTcCs$t||d�}d|_|sd|_t|�S)N)rTr)rrr�list)�sZcommentsrZlexr+r+r,r,s
z[^\w@%+=:,./-]cCs,|sdSt|�dkr|Sd|jdd�dS)Nz''�'z'"'"')�_find_unsafe�replace)rYr+r+r,r6s
cCs(x"|j�}|sPtdt|��qWdS)NzToken: )r;r.r/)ZlexerZttr+r+r,�
_print_tokensBs
r]�__main__r)FT)rK�rer�collectionsr�ior�__all__rr�compile�ASCII�searchr[rr]rU�len�argv�fnrP�fr+r+r+r,�<module>
s$