File indexing completed on 2025-03-13 09:21:02
0001
0002
0003
0004 #ifndef Py_INTERNAL_TOKEN_H
0005 #define Py_INTERNAL_TOKEN_H
0006 #ifdef __cplusplus
0007 extern "C" {
0008 #endif
0009
0010 #ifndef Py_BUILD_CORE
0011 # error "this header requires Py_BUILD_CORE define"
0012 #endif
0013
0014 #undef TILDE
0015
0016 #define ENDMARKER 0
0017 #define NAME 1
0018 #define NUMBER 2
0019 #define STRING 3
0020 #define NEWLINE 4
0021 #define INDENT 5
0022 #define DEDENT 6
0023 #define LPAR 7
0024 #define RPAR 8
0025 #define LSQB 9
0026 #define RSQB 10
0027 #define COLON 11
0028 #define COMMA 12
0029 #define SEMI 13
0030 #define PLUS 14
0031 #define MINUS 15
0032 #define STAR 16
0033 #define SLASH 17
0034 #define VBAR 18
0035 #define AMPER 19
0036 #define LESS 20
0037 #define GREATER 21
0038 #define EQUAL 22
0039 #define DOT 23
0040 #define PERCENT 24
0041 #define LBRACE 25
0042 #define RBRACE 26
0043 #define EQEQUAL 27
0044 #define NOTEQUAL 28
0045 #define LESSEQUAL 29
0046 #define GREATEREQUAL 30
0047 #define TILDE 31
0048 #define CIRCUMFLEX 32
0049 #define LEFTSHIFT 33
0050 #define RIGHTSHIFT 34
0051 #define DOUBLESTAR 35
0052 #define PLUSEQUAL 36
0053 #define MINEQUAL 37
0054 #define STAREQUAL 38
0055 #define SLASHEQUAL 39
0056 #define PERCENTEQUAL 40
0057 #define AMPEREQUAL 41
0058 #define VBAREQUAL 42
0059 #define CIRCUMFLEXEQUAL 43
0060 #define LEFTSHIFTEQUAL 44
0061 #define RIGHTSHIFTEQUAL 45
0062 #define DOUBLESTAREQUAL 46
0063 #define DOUBLESLASH 47
0064 #define DOUBLESLASHEQUAL 48
0065 #define AT 49
0066 #define ATEQUAL 50
0067 #define RARROW 51
0068 #define ELLIPSIS 52
0069 #define COLONEQUAL 53
0070 #define EXCLAMATION 54
0071 #define OP 55
0072 #define AWAIT 56
0073 #define ASYNC 57
0074 #define TYPE_IGNORE 58
0075 #define TYPE_COMMENT 59
0076 #define SOFT_KEYWORD 60
0077 #define FSTRING_START 61
0078 #define FSTRING_MIDDLE 62
0079 #define FSTRING_END 63
0080 #define COMMENT 64
0081 #define NL 65
0082 #define ERRORTOKEN 66
0083 #define N_TOKENS 68
0084 #define NT_OFFSET 256
0085
0086
0087
0088 #define ISTERMINAL(x) ((x) < NT_OFFSET)
0089 #define ISNONTERMINAL(x) ((x) >= NT_OFFSET)
0090 #define ISEOF(x) ((x) == ENDMARKER)
0091 #define ISWHITESPACE(x) ((x) == ENDMARKER || \
0092 (x) == NEWLINE || \
0093 (x) == INDENT || \
0094 (x) == DEDENT)
0095 #define ISSTRINGLIT(x) ((x) == STRING || \
0096 (x) == FSTRING_MIDDLE)
0097
0098
0099
0100 PyAPI_DATA(const char * const) _PyParser_TokenNames[];
0101 PyAPI_FUNC(int) _PyToken_OneChar(int);
0102 PyAPI_FUNC(int) _PyToken_TwoChars(int, int);
0103 PyAPI_FUNC(int) _PyToken_ThreeChars(int, int, int);
0104
0105 #ifdef __cplusplus
0106 }
0107 #endif
0108 #endif