SILENT KILLERPanel

Current Path: > > lib64 > python2.7 > lib2to3 > pgen2 > >


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: //lib64/python2.7/lib2to3/pgen2//

NameTypeSizeLast ModifiedActions
__init__.py File 143 bytes April 10 2024 04:58:35.
__init__.pyc File 174 bytes April 10 2024 04:58:46.
__init__.pyo File 174 bytes April 10 2024 04:58:46.
conv.py File 9627 bytes April 10 2024 04:58:35.
conv.pyc File 8189 bytes April 10 2024 04:58:46.
conv.pyo File 7037 bytes April 10 2024 04:58:43.
driver.py File 6041 bytes April 10 2024 04:58:35.
driver.pyc File 6463 bytes April 10 2024 04:58:46.
driver.pyo File 6400 bytes April 10 2024 04:58:43.
grammar.py File 6594 bytes April 10 2024 04:58:35.
grammar.pyc File 7684 bytes April 10 2024 04:58:46.
grammar.pyo File 7684 bytes April 10 2024 04:58:46.
literals.py File 1614 bytes April 10 2024 04:58:35.
literals.pyc File 2018 bytes April 10 2024 04:58:46.
literals.pyo File 1786 bytes April 10 2024 04:58:43.
parse.py File 8053 bytes April 10 2024 04:58:35.
parse.pyc File 7236 bytes April 10 2024 04:58:46.
parse.pyo File 7197 bytes April 10 2024 04:58:43.
pgen.py File 13826 bytes April 10 2024 04:58:35.
pgen.pyc File 12238 bytes April 10 2024 04:58:46.
pgen.pyo File 11625 bytes April 10 2024 04:58:43.
token.py File 1256 bytes April 10 2024 04:58:35.
token.pyc File 2303 bytes April 10 2024 04:58:46.
token.pyo File 2303 bytes April 10 2024 04:58:46.
tokenize.py File 19244 bytes April 10 2024 04:58:35.
tokenize.pyc File 16971 bytes April 10 2024 04:58:46.
tokenize.pyo File 16882 bytes April 10 2024 04:58:43.

Reading File: //lib64/python2.7/lib2to3/pgen2///conv.pyc

�
{fc@sEdZddlZddlmZmZdejfd��YZdS(s�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.

i����N(tgrammarttokent	ConvertercBs2eZdZd�Zd�Zd�Zd�ZRS(s2Grammar 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(s<Load the grammar tables from the text files written by pgen.N(tparse_graminit_htparse_graminit_ct
finish_off(tselft
graminit_ht
graminit_c((s*/usr/lib64/python2.7/lib2to3/pgen2/conv.pytrun/s

c	Csyt|�}Wn#tk
r5}d||fGHtSXi|_i|_d}x�|D]�}|d7}tjd|�}|r�|j�r�d|||j�fGHqU|j�\}}t	|�}||jks�t
�||jks�t
�||j|<||j|<qUWtS(s�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.

        sCan't open %s: %siis^#define\s+(\w+)\s+(\d+)$s%s(%s): can't parse %s(topentIOErrortFalset
symbol2numbert
number2symboltretmatchtstriptgroupstinttAssertionErrortTrue(	Rtfilenametfterrtlinenotlinetmotsymboltnumber((s*/usr/lib64/python2.7/lib2to3/pgen2/conv.pyR5s*		

	
c!Cs�	yt|�}Wn#tk
r5}d||fGHtSXd}|d|j�}}|dksqt||f��|d|j�}}|dks�t||f��|d|j�}}i}g}x�|jd�r�xC|jd�r tjd|�}|st||f��tt	|j
��\}	}
}g}x�t|�D]u}
|d|j�}}tjd|�}|s�t||f��tt	|j
��\}}|j||f�qHW|d|j�}}|d	ks�t||f��|||	|
f<|d|j�}}q�Wtjd
|�}|sKt||f��tt	|j
��\}}|t
|�ks�t||f��g}x�t|�D]�}
|d|j�}}tjd|�}|s�t||f��tt	|j
��\}}	}
||	|
f}|t
|�ks6t||f��|j|�q�W|j|�|d|j�}}|d	ks�t||f��|d|j�}}q�W||_i}tjd|�}|s�t||f��t	|jd��}x�t|�D]�}|d|j�}}tjd
|�}|sFt||f��|jd�}tt	|jdddd��\}}}}|j||ks�t||f��|j||ks�t||f��|dks�t||f��||}|t
|�kst||f��|d|j�}}tjd|�}|sYt||f��i}t|jd��}x`t|�D]R\}}t|�}x7td�D])}|d|>@r�d||d|<q�q�Wq�W||f||<q�W|d|j�}}|d	ks t||f��||_g}|d|j�}}tjd|�}|spt||f��t	|jd��}x�t|�D]�}|d|j�}}tjd|�}|s�t||f��|j
�\}}t	|�}|dkrd}nt|�}|j||f�q�W|d|j�}}|d	ksdt||f��||_|d|j�}}|dks�t||f��|d|j�}}tjd|�}|s�t||f��t	|jd��}|t
|j�kst�|d|j�}}|dksHt||f��|d|j�}}tjd|�}|s�t||f��t	|jd��}|t
|j�ks�t||f��|d|j�}}tjd|�}|s	t||f��t	|jd��} | |jks<	t||f��| |_|d|j�}}|d	ksz	t||f��y|d|j�}}Wntk
r�	nXds�	t||f��dS(s�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>},
                  ...
          };

        sCan't open %s: %siis#include "pgenheaders.h"
s#include "grammar.h"
sstatic arc s)static arc arcs_(\d+)_(\d+)\[(\d+)\] = {$s\s+{(\d+), (\d+)},$s};
s'static state states_(\d+)\[(\d+)\] = {$s\s+{(\d+), arcs_(\d+)_(\d+)},$sstatic dfa dfas\[(\d+)\] = {$s0\s+{(\d+), "(\w+)", (\d+), (\d+), states_(\d+),$iiiis\s+("(?:\\\d\d\d)*")},$is!static label labels\[(\d+)\] = {$s\s+{(\d+), (0|"\w+")},$t0sgrammar _PyParser_Grammar = {
s
\s+(\d+),$s	dfas,
s\s+{(\d+), labels},$s	\s+(\d+)$N(R
RRtnextRt
startswithRRtmapRRtrangetappendtlentstatestgroupR
Rtevalt	enumeratetordtdfastNonetlabelststartt
StopIteration(!RRRRRRtallarcsR%Rtntmtktarcst_titjtstttstateR*tndfasRRtxtytztfirstt	rawbitsettctbyteR,tnlabelsR-((s*/usr/lib64/python2.7/lib2to3/pgen2/conv.pyRTs�		$$
			-%%
$			'!	
cCs�i|_i|_xjt|j�D]Y\}\}}|tjkr_|dk	r_||j|<q"|dkr"||j|<q"q"WdS(s1Create additional useful structures.  (Internal).N(tkeywordsttokensR(R,RtNAMER+(Rtilabelttypetvalue((s*/usr/lib64/python2.7/lib2to3/pgen2/conv.pyR�s		"(t__name__t
__module__t__doc__R	RRR(((s*/usr/lib64/python2.7/lib2to3/pgen2/conv.pyR$s
				�(RKRtpgen2RRtGrammarR(((s*/usr/lib64/python2.7/lib2to3/pgen2/conv.pyt<module>s

SILENT KILLER Tool