Change to flush and close logic to fix #1760556.
[python.git] / Include / parsetok.h
blob2b4ce1ea4ba62ab49f0e16790bbe3b8706d1c56a
2 /* Parser-tokenizer link interface */
4 #ifndef Py_PARSETOK_H
5 #define Py_PARSETOK_H
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 typedef struct {
11 int error;
12 const char *filename;
13 int lineno;
14 int offset;
15 char *text;
16 int token;
17 int expected;
18 } perrdetail;
20 #if 0
21 #define PyPARSE_YIELD_IS_KEYWORD 0x0001
22 #endif
24 #define PyPARSE_DONT_IMPLY_DEDENT 0x0002
26 #if 0
27 #define PyPARSE_WITH_IS_KEYWORD 0x0003
28 #endif
30 PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int,
31 perrdetail *);
32 PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int,
33 char *, char *, perrdetail *);
35 PyAPI_FUNC(node *) PyParser_ParseStringFlags(const char *, grammar *, int,
36 perrdetail *, int);
37 PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, grammar *,
38 int, char *, char *,
39 perrdetail *, int);
41 PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *,
42 const char *,
43 grammar *, int,
44 perrdetail *, int);
46 /* Note that he following function is defined in pythonrun.c not parsetok.c. */
47 PyAPI_FUNC(void) PyParser_SetError(perrdetail *);
49 #ifdef __cplusplus
51 #endif
52 #endif /* !Py_PARSETOK_H */