

def Tokens(self, _parent=None):
    _context = self.Context(_parent, self._scanner, 'Tokens', [])
    tok = []
    while (self._peek('"token"', '"ignore"', 'EOF', '"rule"', context=_context) in ['"token"', '"ignore"']):
        _token = self._peek('"token"', '"ignore"', context=_context)
        if (_token == '"token"'):
            self._scan('"token"', context=_context)
            ID = self._scan('ID', context=_context)
            self._scan('":"', context=_context)
            Str = self.Str(_context)
            tok.append((ID, Str))
        else:
            tok._scan('"ignore"', context=_context)
            self._scan('":"', context=_context)
            Str = self.Str(_context)
            ign = ('#ignore', Str)
            if (self._peek('STMT', '"token"', '"ignore"', 'EOF', '"rule"', context=_context) == 'STMT'):
                STMT = self._scan('STMT', context=_context)
                ign = (ign + (STMT[2:(- 2)],))
            tok.append(ign)
    return tok

dataset/ETHPy150Open smurfix/yapps/yapps/grammar.py ParserDescription.Tokens/VarMisuse@149/197 `self`->`tok`