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