[issue13629] _PyParser_TokenNames does not match up with the token.h numbers
Meador Inge
report at bugs.python.org
Sun Dec 18 19:21:22 CET 2011
New submission from Meador Inge <meadori at gmail.com>:
When making the changes to remove backticks in eb2f70fdbf32, the _PyParser_TokenNames table was incorrectly updated. Now the indexes into _PyParser_TokenNames don't match the token numbers. This can be seen in the output of 'python -d':
$ echo '2 << 1' | ./python -d | grep Token
...
Token NUMBER/'2' ... It's a token we know
Token RIGHTSHIFT/'<<' ... It's a token we know
Token NUMBER/'1' ... It's a token we know
Token NEWLINE/'' ... It's a token we know
Token NEWLINE/'' ... It's a token we know
Token ENDMARKER/'' ... It's a token we know
The fix is trivial. Patch attached.
----------
components: Interpreter Core
files: parser-debug-output.patch
keywords: easy, patch
messages: 149789
nosy: meador.inge
priority: low
severity: normal
stage: patch review
status: open
title: _PyParser_TokenNames does not match up with the token.h numbers
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file24038/parser-debug-output.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13629>
_______________________________________
More information about the Python-bugs-list
mailing list