parsetok.h revision 95292d6caa3af3196c5b9f5f95dae209815c09e5
1
2/* Parser-tokenizer link interface */
3
4#ifndef Py_PARSETOK_H
5#define Py_PARSETOK_H
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef 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
24PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int,
25                                              perrdetail *);
26PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int,
27                                             char *, char *, perrdetail *);
28
29PyAPI_FUNC(node *) PyParser_ParseStringFlags(const char *, grammar *, int,
30                                              perrdetail *, int);
31PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, grammar *,
32						 int, char *, char *,
33						 perrdetail *, int);
34
35PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *,
36					      const char *,
37					      grammar *, int,
38                                              perrdetail *, int);
39#ifdef __cplusplus
40}
41#endif
42#endif /* !Py_PARSETOK_H */
43