Team Fortress 2 Source Code as on 22/4/2020
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.

50 lines
1.3 KiB

  1. /* Parser-tokenizer link interface */
  2. #ifndef Py_PARSETOK_H
  3. #define Py_PARSETOK_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef struct {
  8. int error;
  9. const char *filename;
  10. int lineno;
  11. int offset;
  12. char *text;
  13. int token;
  14. int expected;
  15. } perrdetail;
  16. #if 0
  17. #define PyPARSE_YIELD_IS_KEYWORD 0x0001
  18. #endif
  19. #define PyPARSE_DONT_IMPLY_DEDENT 0x0002
  20. #define PyPARSE_WITH_IS_KEYWORD 0x0003
  21. PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int,
  22. perrdetail *);
  23. PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int,
  24. char *, char *, perrdetail *);
  25. PyAPI_FUNC(node *) PyParser_ParseStringFlags(const char *, grammar *, int,
  26. perrdetail *, int);
  27. PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, grammar *,
  28. int, char *, char *,
  29. perrdetail *, int);
  30. PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *,
  31. const char *,
  32. grammar *, int,
  33. perrdetail *, int);
  34. /* Note that he following function is defined in pythonrun.c not parsetok.c. */
  35. PyAPI_FUNC(void) PyParser_SetError(perrdetail *);
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif /* !Py_PARSETOK_H */