Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.7 KiB

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