AlkantarClanX12

Your IP : 18.217.140.224


Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/shlex.cpython-37.opt-2.pyc

B

YI~d,3�	@s�ddlZddlZddlZddlmZddlmZdddgZGdd�d�Zdd
d�Z	e�
dej�jZ
dd�Zd
d�Zedkr�eej�dkr�ee��n,ejdZee��Zeeee��WdQRXdS)�N)�deque)�StringIO�shlex�split�quotec@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/python37/lib64/python3.7/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)
r
rrr!r1rrrrr/)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!�popleftrrrr/r)r)r,r,r-�
pop_source\s
zshlex.pop_sourcecCs�|jr.|j��}|jdkr*tdt|��|S|��}|jdk	r~x<||jkr||�|���}|rr|\}}|�||�|�	�}qBWx*||j
kr�|js�|j
S|��|�	�}q�W|jdkr�||j
kr�tdt|��ntd�|S)Nrzshlex: popping token z
shlex: token=zshlex: token=EOF)
rr8rr/r0�
read_tokenr"�
sourcehookr6�	get_tokenrr!r9)r)r2�raw�specr5r4r,r,r-r<es.




zshlex.get_tokencCs�d}d}�x^|jr$|jr$|j��}n|j�d�}|dkrF|jd7_|jdkrbtd|j|f�|jdkrvd|_	Pq|jdk�r�|s�d|_P�qf||j
kr�|jdkr�td	�|j	s�|jr|rPnqn�||jkr�|j�
�|jd7_n�|j�r
||jk�r
d
}||_n�||jk�r$||_	d
|_np||jk�r>||_	d|_nV||jk�r`|j�sX||_	||_n4|j�rv||_	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�|�sn|jdk�rftd�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�r\|j�
�|jd7_|j�rfd|_|j	�sT|jr|rPnqq|jdk�r�||jk�r�|j	|7_	n ||j
k�r�|j�|�d|_Pq|j�r�||jk�r�||_q|j�r�||jk�r�d
}||_q||jk�s||jk�s|j�r|j	|7_	q|j�r(|j�|�n|j�|�|jdk�rHtd�d|_|j	�s`|jr|rPqqqW|j	}d|_	|j�r�|�s�|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 character)rBrCz%shlex: I see whitespace in word statez&shlex: I see punctuation in word statezshlex: raw token=zshlex: raw token=EOF)r*r$�popr�readrrr/rr rrr�readlinerrrr�
ValueErrorr�appendrr1r0)r)ZquotedZescapedstateZnextchar�resultr,r,r-r:�s�









zshlex.read_tokencCsV|ddkr|dd�}t|jt�rHtj�|�sHtj�tj�|j�|�}|t|d�fS)Nrr
r����r)	r
rr�os�path�isabs�join�dirname�open)r)r5r,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|��}||jkrt�|S)N)r<r�
StopIteration)r)r r,r,r-�__next__*s
zshlex.__next__)NNFF)N)NN)�__name__�
__module__�__qualname__r.�propertyr*r3r6r9r<r:r;rRrSrUr,r,r,r-rs
.
	 	
FTcCs$t||d�}d|_|sd|_t|�S)N)rTr)rrr�list)�sZcommentsrZlexr,r,r-r0s
z[^\w@%+=:,./-]cCs,|sdSt|�dkr|Sd|�dd�dS)Nz''�'z'"'"')�_find_unsafe�replace)r[r,r,r-r;s
cCs(x"|��}|sPtdt|��qWdS)NzToken: )r<r/r0)Zlexer�ttr,r,r-�
_print_tokensGs
r`�__main__r)FT)rL�rer�collectionsr�ior�__all__rr�compile�ASCII�searchr]rr`rV�len�argv�fnrQ�fr,r,r,r-�<module>
s$