Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | |
2 | /* Parser-tokenizer link interface */ | |
3 | ||
4 | #ifndef Py_PARSETOK_H | |
5 | #define Py_PARSETOK_H | |
6 | #ifdef __cplusplus | |
7 | extern "C" { | |
8 | #endif | |
9 | ||
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; | |
19 | ||
20 | #if 0 | |
21 | #define PyPARSE_YIELD_IS_KEYWORD 0x0001 | |
22 | #endif | |
23 | ||
24 | #define PyPARSE_DONT_IMPLY_DEDENT 0x0002 | |
25 | ||
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 *); | |
30 | ||
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); | |
36 | ||
37 | PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *, | |
38 | const char *, | |
39 | grammar *, int, | |
40 | perrdetail *, int); | |
41 | ||
42 | /* Note that he following function is defined in pythonrun.c not parsetok.c. */ | |
43 | PyAPI_FUNC(void) PyParser_SetError(perrdetail *); | |
44 | ||
45 | #ifdef __cplusplus | |
46 | } | |
47 | #endif | |
48 | #endif /* !Py_PARSETOK_H */ |