[issue13629] _PyParser_TokenNames does not match up with the token.h numbers

2012-01-15 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 1c0c6fa7341c by Meador Inge in branch '3.2':
Issue #13629: Renumber the tokens in token.h to match the _PyParser_TokenNames 
indexes.
http://hg.python.org/cpython/rev/1c0c6fa7341c

New changeset c0660d7cc1fe by Meador Inge in branch 'default':
Issue #13629: Renumber the tokens in token.h to match the _PyParser_TokenNames 
indexes.
http://hg.python.org/cpython/rev/c0660d7cc1fe

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13629] _PyParser_TokenNames does not match up with the token.h numbers

2012-01-15 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13629] _PyParser_TokenNames does not match up with the token.h numbers

2012-01-12 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

Here is a patch that renumber the tokens.  I also regenerated token.py.

--
nosy: +georg.brandl
Added file: http://bugs.python.org/file24225/renumber-tokens.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13629] _PyParser_TokenNames does not match up with the token.h numbers

2011-12-18 Thread Meador Inge

New submission from Meador Inge mead...@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 rep...@bugs.python.org
http://bugs.python.org/issue13629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13629] _PyParser_TokenNames does not match up with the token.h numbers

2011-12-18 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Is there a reason not to renumber token.h?

--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13629] _PyParser_TokenNames does not match up with the token.h numbers

2011-12-18 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

 Is there a reason not to renumber token.h?

I thought about that, but at the time I wasn't sure whether or not that
would break anything.  I went with the current patch because it is lower
risk.

On the other hand, proper clients of token.h should only be using the macros 
and should have no knowledge of the numeric codes.  If they do use the numeric 
codes directly somehow, then that is their issue.  So, I guess it is OK to 
renumber token.h.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com