/usr/lib/pypy/dist-packages/rply/token.py is in pypy-rply 0.7.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | class BaseBox(object):
_attrs_ = []
class Token(BaseBox):
def __init__(self, name, value, source_pos=None):
self.name = name
self.value = value
self.source_pos = source_pos
def __repr__(self):
return "Token(%r, %r)" % (self.name, self.value)
def __eq__(self, other):
if not isinstance(other, Token):
return NotImplemented
return self.name == other.name and self.value == other.value
def gettokentype(self):
return self.name
def getsourcepos(self):
return self.source_pos
def getstr(self):
return self.value
class SourcePosition(object):
def __init__(self, idx, lineno, colno):
self.idx = idx
self.lineno = lineno
self.colno = colno
|