1 | /* Auto-generated by Tools/scripts/generate_token.py */ |
2 | |
3 | /* Token types */ |
4 | #ifndef Py_LIMITED_API |
5 | #ifndef Py_TOKEN_H |
6 | #define Py_TOKEN_H |
7 | #ifdef __cplusplus |
8 | extern "C" { |
9 | #endif |
10 | |
11 | #undef TILDE /* Prevent clash of our definition with system macro. Ex AIX, ioctl.h */ |
12 | |
13 | #define ENDMARKER 0 |
14 | #define NAME 1 |
15 | #define NUMBER 2 |
16 | #define STRING 3 |
17 | #define NEWLINE 4 |
18 | #define INDENT 5 |
19 | #define DEDENT 6 |
20 | #define LPAR 7 |
21 | #define RPAR 8 |
22 | #define LSQB 9 |
23 | #define RSQB 10 |
24 | #define COLON 11 |
25 | #define COMMA 12 |
26 | #define SEMI 13 |
27 | #define PLUS 14 |
28 | #define MINUS 15 |
29 | #define STAR 16 |
30 | #define SLASH 17 |
31 | #define VBAR 18 |
32 | #define AMPER 19 |
33 | #define LESS 20 |
34 | #define GREATER 21 |
35 | #define EQUAL 22 |
36 | #define DOT 23 |
37 | #define PERCENT 24 |
38 | #define LBRACE 25 |
39 | #define RBRACE 26 |
40 | #define EQEQUAL 27 |
41 | #define NOTEQUAL 28 |
42 | #define LESSEQUAL 29 |
43 | #define GREATEREQUAL 30 |
44 | #define TILDE 31 |
45 | #define CIRCUMFLEX 32 |
46 | #define LEFTSHIFT 33 |
47 | #define RIGHTSHIFT 34 |
48 | #define DOUBLESTAR 35 |
49 | #define PLUSEQUAL 36 |
50 | #define MINEQUAL 37 |
51 | #define STAREQUAL 38 |
52 | #define SLASHEQUAL 39 |
53 | #define PERCENTEQUAL 40 |
54 | #define AMPEREQUAL 41 |
55 | #define VBAREQUAL 42 |
56 | #define CIRCUMFLEXEQUAL 43 |
57 | #define LEFTSHIFTEQUAL 44 |
58 | #define RIGHTSHIFTEQUAL 45 |
59 | #define DOUBLESTAREQUAL 46 |
60 | #define DOUBLESLASH 47 |
61 | #define DOUBLESLASHEQUAL 48 |
62 | #define AT 49 |
63 | #define ATEQUAL 50 |
64 | #define RARROW 51 |
65 | #define ELLIPSIS 52 |
66 | #define COLONEQUAL 53 |
67 | #define OP 54 |
68 | #define AWAIT 55 |
69 | #define ASYNC 56 |
70 | #define TYPE_IGNORE 57 |
71 | #define 58 |
72 | #define SOFT_KEYWORD 59 |
73 | #define ERRORTOKEN 60 |
74 | #define N_TOKENS 64 |
75 | #define NT_OFFSET 256 |
76 | |
77 | /* Special definitions for cooperation with parser */ |
78 | |
79 | #define ISTERMINAL(x) ((x) < NT_OFFSET) |
80 | #define ISNONTERMINAL(x) ((x) >= NT_OFFSET) |
81 | #define ISEOF(x) ((x) == ENDMARKER) |
82 | #define ISWHITESPACE(x) ((x) == ENDMARKER || \ |
83 | (x) == NEWLINE || \ |
84 | (x) == INDENT || \ |
85 | (x) == DEDENT) |
86 | |
87 | |
88 | PyAPI_DATA(const char * const) _PyParser_TokenNames[]; /* Token names */ |
89 | PyAPI_FUNC(int) PyToken_OneChar(int); |
90 | PyAPI_FUNC(int) PyToken_TwoChars(int, int); |
91 | PyAPI_FUNC(int) PyToken_ThreeChars(int, int, int); |
92 | |
93 | #ifdef __cplusplus |
94 | } |
95 | #endif |
96 | #endif /* !Py_TOKEN_H */ |
97 | #endif /* Py_LIMITED_API */ |
98 | |