The silencing of DeprecationWarning was not taking -3 into consideration. Since
[python.git] / Include / token.h
blob4250000d135103bf40c61229aa6018f583ac4ec6
2 /* Token types */
4 #ifndef Py_TOKEN_H
5 #define Py_TOKEN_H
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 #define ENDMARKER 0
11 #define NAME 1
12 #define NUMBER 2
13 #define STRING 3
14 #define NEWLINE 4
15 #define INDENT 5
16 #define DEDENT 6
17 #define LPAR 7
18 #define RPAR 8
19 #define LSQB 9
20 #define RSQB 10
21 #define COLON 11
22 #define COMMA 12
23 #define SEMI 13
24 #define PLUS 14
25 #define MINUS 15
26 #define STAR 16
27 #define SLASH 17
28 #define VBAR 18
29 #define AMPER 19
30 #define LESS 20
31 #define GREATER 21
32 #define EQUAL 22
33 #define DOT 23
34 #define PERCENT 24
35 #define BACKQUOTE 25
36 #define LBRACE 26
37 #define RBRACE 27
38 #define EQEQUAL 28
39 #define NOTEQUAL 29
40 #define LESSEQUAL 30
41 #define GREATEREQUAL 31
42 #define TILDE 32
43 #define CIRCUMFLEX 33
44 #define LEFTSHIFT 34
45 #define RIGHTSHIFT 35
46 #define DOUBLESTAR 36
47 #define PLUSEQUAL 37
48 #define MINEQUAL 38
49 #define STAREQUAL 39
50 #define SLASHEQUAL 40
51 #define PERCENTEQUAL 41
52 #define AMPEREQUAL 42
53 #define VBAREQUAL 43
54 #define CIRCUMFLEXEQUAL 44
55 #define LEFTSHIFTEQUAL 45
56 #define RIGHTSHIFTEQUAL 46
57 #define DOUBLESTAREQUAL 47
58 #define DOUBLESLASH 48
59 #define DOUBLESLASHEQUAL 49
60 #define AT 50
61 /* Don't forget to update the table _PyParser_TokenNames in tokenizer.c! */
62 #define OP 51
63 #define ERRORTOKEN 52
64 #define N_TOKENS 53
66 /* Special definitions for cooperation with parser */
68 #define NT_OFFSET 256
70 #define ISTERMINAL(x) ((x) < NT_OFFSET)
71 #define ISNONTERMINAL(x) ((x) >= NT_OFFSET)
72 #define ISEOF(x) ((x) == ENDMARKER)
75 PyAPI_DATA(char *) _PyParser_TokenNames[]; /* Token names */
76 PyAPI_FUNC(int) PyToken_OneChar(int);
77 PyAPI_FUNC(int) PyToken_TwoChars(int, int);
78 PyAPI_FUNC(int) PyToken_ThreeChars(int, int, int);
80 #ifdef __cplusplus
82 #endif
83 #endif /* !Py_TOKEN_H */