ok

Mini Shell

Direktori : /lib/python3.6/site-packages/ply/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/ply/__pycache__/ygen.cpython-36.pyc

3

r��W��@s:ddlZddlZdd�Zdd�Zdd�Zedkr6e�dS)	�NcCsht|�}d|}d|}x |D]\}}|j�j|�rPqWx |D]\}}|j�j|�r@Pq@W|d|fS)Nz
#--! %s-startz#--! %s-end�)�	enumerate�strip�
startswith�endswith)�lines�tagZsrclinesZ	start_tagZend_tagZstart_index�lineZ	end_index�r
�/usr/lib/python3.6/ygen.py�get_source_range
srcCsFg}d}d|}x0|D](}|j�j|�r0|}q|r|j|�qW|S)NTz#--! %s)rr�append)rrZfiltered_lines�includeZtag_textr	r
r
r�filter_sections
rcCs�tjjt�}tjtjj|d�tjj|d��ttjj|d�d��}|j�}WdQRXt	|d�\}}t	|d�\}}t	|d�\}}|||�}	t
|	d�}
t
|
d�}||||�<|
|||�<d	d
�|D�}ttjj|d�d��}|j|�WdQRXtd�dS)
Nzyacc.pyzyacc.py.bak�rZ
parsedebugZparseoptzparseopt-notrack�DEBUGZTRACKINGcSsg|]}|j�d�qS)�
)�rstrip)�.0r	r
r
r�
<listcomp>>szmain.<locals>.<listcomp>�wzUpdated yacc.py)
�os�path�dirname�__file__�shutilZcopy2�join�open�	readlinesrr�
writelines�print)r�frZparse_startZ	parse_endZparseopt_startZparseopt_endZparseopt_notrack_startZparseopt_notrack_endZ
orig_linesZparseopt_linesZparseopt_notrack_linesr
r
r�main's  

r"�__main__)Zos.pathrrrrr"�__name__r
r
r
r�<module>
s

Zerion Mini Shell 1.0