Closed as not planned
Description
I was writing a lexer, and found this weird bug in python
Python version: Python 3.10.4
Os: Windows 11 21H2
...
Token.LeftParenthesis
char: '"' tell: 102
None
char: ')' tell: 18446744073709551746
-----> tell: 18446744073709551746
-----> tell: 18446744073709551745
Traceback (most recent call last):
File "C:\Users\Usuário\Documents\Projetos\Bug\bug.py", line 11, in <module>
for token in tokenize(open(fname)):
File "C:\Users\Usuário\Documents\Projetos\Bug\tokenizer.py", line 85, in tokenize
yield scan_token(stream)
File "C:\Users\Usuário\Documents\Projetos\Bug\tokenizer.py", line 58, in scan_token
raise SyntaxError(f'invalid token {stream.read(1)!r}')
SyntaxError: invalid token '\n'
i couldnt reproduce this bug with a example with less than 100 lines, but it is pretty organized
Obs:.
- MAX = 2**64 = 18446744073709551616
- If we subtract: MAX - 18446744073709551746 = -130
Here is the bug files:
Bug.zip