[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.19
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
lib64
/
python3.6
/
lib2to3
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 __pycache__
SET
[ DEL ]
📁 fixes
SET
[ DEL ]
📁 pgen2
SET
[ DEL ]
📄 Grammar.txt
6,562 B
SET
[ EDIT ]
|
[ DEL ]
📄 Grammar3.6.8.final.0.pickle
32,252 B
SET
[ EDIT ]
|
[ DEL ]
📄 PatternGrammar.txt
793 B
SET
[ EDIT ]
|
[ DEL ]
📄 PatternGrammar3.6.8.final.0.pickle
2,093 B
SET
[ EDIT ]
|
[ DEL ]
📄 __init__.py
7 B
SET
[ EDIT ]
|
[ DEL ]
📄 __main__.py
67 B
SET
[ EDIT ]
|
[ DEL ]
📄 btm_matcher.py
6,833 B
SET
[ EDIT ]
|
[ DEL ]
📄 btm_utils.py
9,966 B
SET
[ EDIT ]
|
[ DEL ]
📄 fixer_base.py
6,690 B
SET
[ EDIT ]
|
[ DEL ]
📄 fixer_util.py
15,207 B
SET
[ EDIT ]
|
[ DEL ]
📄 main.py
11,653 B
SET
[ EDIT ]
|
[ DEL ]
📄 patcomp.py
7,044 B
SET
[ EDIT ]
|
[ DEL ]
📄 pygram.py
1,154 B
SET
[ EDIT ]
|
[ DEL ]
📄 pytree.py
28,052 B
SET
[ EDIT ]
|
[ DEL ]
📄 refactor.py
27,965 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: pygram.py
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Export the Python grammar and symbols.""" # Python imports import os # Local imports from .pgen2 import token from .pgen2 import driver from . import pytree # The grammar file _GRAMMAR_FILE = os.path.join(os.path.dirname(__file__), "Grammar.txt") _PATTERN_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__), "PatternGrammar.txt") class Symbols(object): def __init__(self, grammar): """Initializer. Creates an attribute for each grammar symbol (nonterminal), whose value is the symbol's type (an int >= 256). """ for name, symbol in grammar.symbol2number.items(): setattr(self, name, symbol) python_grammar = driver.load_packaged_grammar("lib2to3", _GRAMMAR_FILE) python_symbols = Symbols(python_grammar) python_grammar_no_print_statement = python_grammar.copy() del python_grammar_no_print_statement.keywords["print"] pattern_grammar = driver.load_packaged_grammar("lib2to3", _PATTERN_GRAMMAR_FILE) pattern_symbols = Symbols(pattern_grammar)