HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //proc/self/root/opt/alt/python37/lib/python3.7/site-packages/ply/__pycache__/ygen.cpython-37.pyc
B

տV��@s:ddlZddlZdd�Zdd�Zdd�Zedkr6e�dS)	�NcCsht|�}d|}d|}x |D]\}}|���|�rPqWx |D]\}}|���|�r@Pq@W|d|fS)Nz
#--! %s-startz#--! %s-end�)�	enumerate�strip�
startswith�endswith)�lines�tagZsrclinesZ	start_tagZend_tagZstart_index�lineZ	end_index�r
�9/opt/alt/python37/lib/python3.7/site-packages/ply/ygen.py�get_source_range
srcCsFg}d}d|}x0|D](}|���|�r0|}q|r|�|�qW|S)NTz#--! %s)rr�append)rrZfiltered_linesZincludeZtag_textr	r
r
r�filter_sections
rc	Cs�tj�t�}t�tj�|d�tj�|d��ttj�|d�d��}|��}WdQRXt	|d�\}}t	|d�\}}t	|d�\}}|||�}	t
|	d�}
t
|
d�}||||�<|
|||�<d	d
�|D�}ttj�|d�d��}|�|�WdQRXtd�dS)
Nzyacc.pyzyacc.py.bak�rZ
parsedebugZparseoptzparseopt-notrack�DEBUGZTRACKINGcSsg|]}|��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