Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | #ifndef Py_PARSETOK_H |
2 | #define Py_PARSETOK_H | |
3 | #ifdef __cplusplus | |
4 | extern "C" { | |
5 | #endif | |
6 | ||
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 | ||
17 | #if 0 | |
18 | #define PyPARSE_YIELD_IS_KEYWORD 0x0001 | |
19 | #endif | |
20 | ||
21 | #define PyPARSE_DONT_IMPLY_DEDENT 0x0002 | |
22 | ||
23 | PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int, | |
24 | perrdetail *); | |
25 | PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int, | |
26 | char *, char *, perrdetail *); | |
27 | ||
28 | PyAPI_FUNC(node *) PyParser_ParseStringFlags(const char *, grammar *, int, | |
29 | perrdetail *, int); | |
30 | PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, grammar *, | |
31 | int, char *, char *, | |
32 | perrdetail *, int); | |
33 | ||
34 | PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *, | |
35 | const char *, | |
36 | grammar *, int, | |
37 | perrdetail *, int); | |
38 | ||
39 | /* Note that he following function is defined in pythonrun.c not parsetok.c. */ | |
40 | PyAPI_FUNC(void) PyParser_SetError(perrdetail *); | |
41 | ||
42 | #ifdef __cplusplus | |
43 | } | |
44 | #endif | |
45 | #endif /* !Py_PARSETOK_H */ |