Commit 33880601 authored by Meador Inge's avatar Meador Inge

Issue #13629: Renumber the tokens in token.h to match the _PyParser_TokenNames indexes.

parent 7f53aea5
...@@ -34,38 +34,37 @@ extern "C" { ...@@ -34,38 +34,37 @@ extern "C" {
#define EQUAL 22 #define EQUAL 22
#define DOT 23 #define DOT 23
#define PERCENT 24 #define PERCENT 24
/* #define BACKQUOTE 25 */ #define LBRACE 25
#define LBRACE 26 #define RBRACE 26
#define RBRACE 27 #define EQEQUAL 27
#define EQEQUAL 28 #define NOTEQUAL 28
#define NOTEQUAL 29 #define LESSEQUAL 29
#define LESSEQUAL 30 #define GREATEREQUAL 30
#define GREATEREQUAL 31 #define TILDE 31
#define TILDE 32 #define CIRCUMFLEX 32
#define CIRCUMFLEX 33 #define LEFTSHIFT 33
#define LEFTSHIFT 34 #define RIGHTSHIFT 34
#define RIGHTSHIFT 35 #define DOUBLESTAR 35
#define DOUBLESTAR 36 #define PLUSEQUAL 36
#define PLUSEQUAL 37 #define MINEQUAL 37
#define MINEQUAL 38 #define STAREQUAL 38
#define STAREQUAL 39 #define SLASHEQUAL 39
#define SLASHEQUAL 40 #define PERCENTEQUAL 40
#define PERCENTEQUAL 41 #define AMPEREQUAL 41
#define AMPEREQUAL 42 #define VBAREQUAL 42
#define VBAREQUAL 43 #define CIRCUMFLEXEQUAL 43
#define CIRCUMFLEXEQUAL 44 #define LEFTSHIFTEQUAL 44
#define LEFTSHIFTEQUAL 45 #define RIGHTSHIFTEQUAL 45
#define RIGHTSHIFTEQUAL 46 #define DOUBLESTAREQUAL 46
#define DOUBLESTAREQUAL 47 #define DOUBLESLASH 47
#define DOUBLESLASH 48 #define DOUBLESLASHEQUAL 48
#define DOUBLESLASHEQUAL 49 #define AT 49
#define AT 50 #define RARROW 50
#define RARROW 51 #define ELLIPSIS 51
#define ELLIPSIS 52
/* Don't forget to update the table _PyParser_TokenNames in tokenizer.c! */ /* Don't forget to update the table _PyParser_TokenNames in tokenizer.c! */
#define OP 53 #define OP 52
#define ERRORTOKEN 54 #define ERRORTOKEN 53
#define N_TOKENS 55 #define N_TOKENS 54
/* Special definitions for cooperation with parser */ /* Special definitions for cooperation with parser */
......
...@@ -35,36 +35,36 @@ GREATER = 21 ...@@ -35,36 +35,36 @@ GREATER = 21
EQUAL = 22 EQUAL = 22
DOT = 23 DOT = 23
PERCENT = 24 PERCENT = 24
LBRACE = 26 LBRACE = 25
RBRACE = 27 RBRACE = 26
EQEQUAL = 28 EQEQUAL = 27
NOTEQUAL = 29 NOTEQUAL = 28
LESSEQUAL = 30 LESSEQUAL = 29
GREATEREQUAL = 31 GREATEREQUAL = 30
TILDE = 32 TILDE = 31
CIRCUMFLEX = 33 CIRCUMFLEX = 32
LEFTSHIFT = 34 LEFTSHIFT = 33
RIGHTSHIFT = 35 RIGHTSHIFT = 34
DOUBLESTAR = 36 DOUBLESTAR = 35
PLUSEQUAL = 37 PLUSEQUAL = 36
MINEQUAL = 38 MINEQUAL = 37
STAREQUAL = 39 STAREQUAL = 38
SLASHEQUAL = 40 SLASHEQUAL = 39
PERCENTEQUAL = 41 PERCENTEQUAL = 40
AMPEREQUAL = 42 AMPEREQUAL = 41
VBAREQUAL = 43 VBAREQUAL = 42
CIRCUMFLEXEQUAL = 44 CIRCUMFLEXEQUAL = 43
LEFTSHIFTEQUAL = 45 LEFTSHIFTEQUAL = 44
RIGHTSHIFTEQUAL = 46 RIGHTSHIFTEQUAL = 45
DOUBLESTAREQUAL = 47 DOUBLESTAREQUAL = 46
DOUBLESLASH = 48 DOUBLESLASH = 47
DOUBLESLASHEQUAL = 49 DOUBLESLASHEQUAL = 48
AT = 50 AT = 49
RARROW = 51 RARROW = 50
ELLIPSIS = 52 ELLIPSIS = 51
OP = 53 OP = 52
ERRORTOKEN = 54 ERRORTOKEN = 53
N_TOKENS = 55 N_TOKENS = 54
NT_OFFSET = 256 NT_OFFSET = 256
#--end constants-- #--end constants--
......
...@@ -10,6 +10,9 @@ What's New in Python 3.2.3? ...@@ -10,6 +10,9 @@ What's New in Python 3.2.3?
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #13629: Renumber the tokens in token.h so that they match the indexes
into _PyParser_TokenNames.
- Fix the fix for issue #12149: it was incorrect, although it had the side - Fix the fix for issue #12149: it was incorrect, although it had the side
effect of appearing to resolve the issue. Thanks to Mark Shannon for effect of appearing to resolve the issue. Thanks to Mark Shannon for
noticing. noticing.
......
...@@ -1978,7 +1978,7 @@ static label labels[168] = { ...@@ -1978,7 +1978,7 @@ static label labels[168] = {
{258, 0}, {258, 0},
{327, 0}, {327, 0},
{259, 0}, {259, 0},
{50, 0}, {49, 0},
{289, 0}, {289, 0},
{7, 0}, {7, 0},
{330, 0}, {330, 0},
...@@ -1990,7 +1990,7 @@ static label labels[168] = { ...@@ -1990,7 +1990,7 @@ static label labels[168] = {
{1, "def"}, {1, "def"},
{1, 0}, {1, 0},
{263, 0}, {263, 0},
{51, 0}, {50, 0},
{302, 0}, {302, 0},
{11, 0}, {11, 0},
{301, 0}, {301, 0},
...@@ -1999,7 +1999,7 @@ static label labels[168] = { ...@@ -1999,7 +1999,7 @@ static label labels[168] = {
{22, 0}, {22, 0},
{12, 0}, {12, 0},
{16, 0}, {16, 0},
{36, 0}, {35, 0},
{266, 0}, {266, 0},
{267, 0}, {267, 0},
{270, 0}, {270, 0},
...@@ -2016,6 +2016,7 @@ static label labels[168] = { ...@@ -2016,6 +2016,7 @@ static label labels[168] = {
{273, 0}, {273, 0},
{336, 0}, {336, 0},
{311, 0}, {311, 0},
{36, 0},
{37, 0}, {37, 0},
{38, 0}, {38, 0},
{39, 0}, {39, 0},
...@@ -2026,8 +2027,7 @@ static label labels[168] = { ...@@ -2026,8 +2027,7 @@ static label labels[168] = {
{44, 0}, {44, 0},
{45, 0}, {45, 0},
{46, 0}, {46, 0},
{47, 0}, {48, 0},
{49, 0},
{1, "del"}, {1, "del"},
{326, 0}, {326, 0},
{1, "pass"}, {1, "pass"},
...@@ -2046,7 +2046,7 @@ static label labels[168] = { ...@@ -2046,7 +2046,7 @@ static label labels[168] = {
{1, "import"}, {1, "import"},
{288, 0}, {288, 0},
{23, 0}, {23, 0},
{52, 0}, {51, 0},
{287, 0}, {287, 0},
{285, 0}, {285, 0},
{1, "as"}, {1, "as"},
...@@ -2088,38 +2088,38 @@ static label labels[168] = { ...@@ -2088,38 +2088,38 @@ static label labels[168] = {
{310, 0}, {310, 0},
{20, 0}, {20, 0},
{21, 0}, {21, 0},
{28, 0}, {27, 0},
{31, 0},
{30, 0}, {30, 0},
{29, 0}, {29, 0},
{29, 0}, {28, 0},
{28, 0},
{1, "is"}, {1, "is"},
{313, 0}, {313, 0},
{18, 0}, {18, 0},
{314, 0}, {314, 0},
{33, 0}, {32, 0},
{315, 0}, {315, 0},
{19, 0}, {19, 0},
{316, 0}, {316, 0},
{33, 0},
{34, 0}, {34, 0},
{35, 0},
{317, 0}, {317, 0},
{14, 0}, {14, 0},
{15, 0}, {15, 0},
{318, 0}, {318, 0},
{17, 0}, {17, 0},
{24, 0}, {24, 0},
{48, 0}, {47, 0},
{32, 0}, {31, 0},
{319, 0}, {319, 0},
{320, 0}, {320, 0},
{322, 0}, {322, 0},
{321, 0}, {321, 0},
{9, 0}, {9, 0},
{10, 0}, {10, 0},
{26, 0}, {25, 0},
{328, 0}, {328, 0},
{27, 0}, {26, 0},
{2, 0}, {2, 0},
{3, 0}, {3, 0},
{1, "None"}, {1, "None"},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment