Saved and restored logging._handlerList at the same time as saving/restoring logging...
[python.git] / Include / parsetok.h
blobb78856685e985347441d44b3e2584ffefc013132
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 PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int,
27 perrdetail *);
28 PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int,
29 char *, char *, perrdetail *);
31 PyAPI_FUNC(node *) PyParser_ParseStringFlags(const char *, grammar *, int,
32 perrdetail *, int);
33 PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, grammar *,
34 int, char *, char *,
35 perrdetail *, int);
37 PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *,
38 const char *,
39 grammar *, int,
40 perrdetail *, int);
42 /* Note that he following function is defined in pythonrun.c not parsetok.c. */
43 PyAPI_FUNC(void) PyParser_SetError(perrdetail *);
45 #ifdef __cplusplus
47 #endif
48 #endif /* !Py_PARSETOK_H */