SILENT KILLERPanel

Current Path: > > opt > alt > > python35 > lib64 > python3.5 > lib2to3 > pgen2 > __pycache__


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/alt//python35/lib64/python3.5/lib2to3/pgen2/__pycache__

NameTypeSizeLast ModifiedActions
__init__.cpython-35.opt-1.pyc File 174 bytes May 31 2024 13:51:50.
__init__.cpython-35.opt-2.pyc File 130 bytes May 31 2024 13:51:30.
__init__.cpython-35.pyc File 174 bytes May 31 2024 13:51:55.
conv.cpython-35.opt-1.pyc File 6728 bytes May 31 2024 13:51:50.
conv.cpython-35.opt-2.pyc File 4226 bytes May 31 2024 13:51:30.
conv.cpython-35.pyc File 7859 bytes May 31 2024 13:51:55.
driver.cpython-35.opt-1.pyc File 4706 bytes May 31 2024 13:51:50.
driver.cpython-35.opt-2.pyc File 4122 bytes May 31 2024 13:51:30.
driver.cpython-35.pyc File 4766 bytes May 31 2024 13:51:55.
grammar.cpython-35.opt-1.pyc File 7116 bytes May 31 2024 13:51:50.
grammar.cpython-35.opt-2.pyc File 3337 bytes May 31 2024 13:51:30.
grammar.cpython-35.pyc File 7116 bytes May 31 2024 13:51:55.
literals.cpython-35.opt-1.pyc File 1508 bytes May 31 2024 13:51:50.
literals.cpython-35.opt-2.pyc File 1415 bytes May 31 2024 13:51:30.
literals.cpython-35.pyc File 1745 bytes May 31 2024 13:51:55.
parse.cpython-35.opt-1.pyc File 6674 bytes May 31 2024 13:51:51.
parse.cpython-35.opt-2.pyc File 3433 bytes May 31 2024 13:51:30.
parse.cpython-35.pyc File 6710 bytes May 31 2024 13:51:55.
pgen.cpython-35.opt-1.pyc File 10492 bytes May 31 2024 13:51:51.
pgen.cpython-35.opt-2.pyc File 10478 bytes May 31 2024 13:51:30.
pgen.cpython-35.pyc File 11058 bytes May 31 2024 13:51:55.
token.cpython-35.opt-1.pyc File 2025 bytes May 31 2024 13:51:50.
token.cpython-35.opt-2.pyc File 1959 bytes May 31 2024 13:51:30.
token.cpython-35.pyc File 2025 bytes May 31 2024 13:51:55.
tokenize.cpython-35.opt-1.pyc File 15873 bytes May 31 2024 13:51:51.
tokenize.cpython-35.opt-2.pyc File 11926 bytes May 31 2024 13:51:30.
tokenize.cpython-35.pyc File 15956 bytes May 31 2024 13:51:55.

Reading File: //opt/alt//python35/lib64/python3.5/lib2to3/pgen2/__pycache__/conv.cpython-35.opt-1.pyc



��Yf�%�@sEdZddlZddlmZmZGdd�dej�ZdS)a�Convert graminit.[ch] spit out by pgen to Python code.

Pgen is the Python parser generator.  It is useful to quickly create a
parser from a grammar file in Python's grammar notation.  But I don't
want my parsers to be written in C (yet), so I'm translating the
parsing tables to Python data structures and writing a Python parse
engine.

Note that the token numbers are constants determined by the standard
Python tokenizer.  The standard token module defines these numbers and
their names (the names are not used much).  The token numbers are
hardcoded into the Python tokenizer and into pgen.  A Python
implementation of the Python tokenizer is also available, in the
standard tokenize module.

On the other hand, symbol numbers (representing the grammar's
non-terminals) are assigned by pgen based on the actual grammar
input.

Note: this module is pretty much obsolete; the pgen module generates
equivalent grammar tables directly from the Grammar.txt input file
without having to invoke the Python pgen C program.

�N)�grammar�tokenc@sFeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�	Convertera2Grammar subclass that reads classic pgen output files.

    The run() method reads the tables as produced by the pgen parser
    generator, typically contained in two C files, graminit.h and
    graminit.c.  The other methods are for internal use only.

    See the base class for more documentation.

    cCs(|j|�|j|�|j�dS)z<Load the grammar tables from the text files written by pgen.N)�parse_graminit_h�parse_graminit_c�
finish_off)�selfZ
graminit_hZ
graminit_c�r	�7/opt/alt/python35/lib64/python3.5/lib2to3/pgen2/conv.py�run/s

z
Converter.runc	Csyt|�}Wn=tk
rO}ztd||f�dSWYdd}~XnXi|_i|_d}x�|D]�}|d7}tjd|�}|r�|j�r�td|||j�f�qo|j�\}}t	|�}||j|<||j|<qoWdS)	z�Parse the .h file written by pgen.  (Internal)

        This file is a sequence of #define statements defining the
        nonterminals of the grammar as numbers.  We build two tables
        mapping the numbers to names and back.

        zCan't open %s: %sFNr�z^#define\s+(\w+)\s+(\d+)$z%s(%s): can't parse %sT)
�open�OSError�printZ
symbol2numberZ
number2symbol�re�match�strip�groups�int)	r�filename�f�err�lineno�line�mo�symbol�numberr	r	r
r5s&		


zConverter.parse_graminit_hc!Cs~yt|�}Wn=tk
rO}ztd||f�dSWYdd}~XnXd}|dt|�}}|dt|�}}|dt|�}}i}g}x|jd�r�x|jd�r�tjd|�}ttt	|j
���\}	}
}g}xqt|�D]c}
|dt|�}}tjd|�}ttt	|j
���\}}|j||f�qW|dt|�}}|||	|
f<|dt|�}}q�Wtjd	|�}ttt	|j
���\}}g}x~t|�D]p}
|dt|�}}tjd
|�}ttt	|j
���\}}	}
||	|
f}|j|�qW|j|�|dt|�}}|dt|�}}q�W||_
i}tjd|�}t	|jd��}x=t|�D]/}|dt|�}}tjd|�}|jd
�}ttt	|jdddd���\}}}}||}|dt|�}}tjd|�}i}t|jd��}x]t|�D]O\}}t|�}x4td�D]&}|d|>@r�d||d|<q�Wq�W||f||<q�W|dt|�}}||_g}|dt|�}}tjd|�}t	|jd��}x�t|�D]�}|dt|�}}tjd|�}|j
�\}}t	|�}|dkr�d}nt|�}|j||f�q�W|dt|�}}||_|dt|�}}|dt|�}}tjd|�}t	|jd��}|dt|�}}|dt|�}}tjd|�}t	|jd��}|dt|�}}tjd|�}t	|jd��} | |_|dt|�}}y|dt|�}}Wntk
ryYnXdS)a�Parse the .c file written by pgen.  (Internal)

        The file looks as follows.  The first two lines are always this:

        #include "pgenheaders.h"
        #include "grammar.h"

        After that come four blocks:

        1) one or more state definitions
        2) a table defining dfas
        3) a table defining labels
        4) a struct defining the grammar

        A state definition has the following form:
        - one or more arc arrays, each of the form:
          static arc arcs_<n>_<m>[<k>] = {
                  {<i>, <j>},
                  ...
          };
        - followed by a state array, of the form:
          static state states_<s>[<t>] = {
                  {<k>, arcs_<n>_<m>},
                  ...
          };

        zCan't open %s: %sFNrrzstatic arc z)static arc arcs_(\d+)_(\d+)\[(\d+)\] = {$z\s+{(\d+), (\d+)},$z'static state states_(\d+)\[(\d+)\] = {$z\s+{(\d+), arcs_(\d+)_(\d+)},$zstatic dfa dfas\[(\d+)\] = {$z0\s+{(\d+), "(\w+)", (\d+), (\d+), states_(\d+),$����z\s+("(?:\\\d\d\d)*")},$�z!static label labels\[(\d+)\] = {$z\s+{(\d+), (0|"\w+")},$�0z
\s+(\d+),$z\s+{(\d+), labels},$z	\s+(\d+)$)r
rr�next�
startswithrr�list�maprr�range�append�states�group�eval�	enumerate�ord�dfas�labels�start�
StopIteration)!rrrrrrZallarcsr)r�n�m�kZarcs�_�i�j�s�t�stater.Zndfasrr�x�y�z�firstZ	rawbitset�cZbyter/Znlabelsr0r	r	r
rTs�		$!!$
			3
				
zConverter.parse_graminit_ccCs�i|_i|_xgt|j�D]V\}\}}|tjkr_|dk	r_||j|<q"|dkr"||j|<q"WdS)z1Create additional useful structures.  (Internal).N)�keywords�tokensr,r/r�NAME)rZilabel�type�valuer	r	r
r�s		"zConverter.finish_offN)�__name__�
__module__�__qualname__�__doc__rrrrr	r	r	r
r$s
	�r)rHrZpgen2rrZGrammarrr	r	r	r
�<module>s

SILENT KILLER Tool