PageRenderTime 223ms CodeModel.GetById 100ms app.highlight 5ms RepoModel.GetById 116ms app.codeStats 0ms

/Include/parsetok.h

http://unladen-swallow.googlecode.com/
C++ Header | 64 lines | 48 code | 14 blank | 2 comment | 0 complexity | 3288ec68354eb918cf8a994a902ed3d4 MD5 | raw file
 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
24#define PyPARSE_DONT_IMPLY_DEDENT	0x0002
25
26#if 0
27#define PyPARSE_WITH_IS_KEYWORD		0x0003
28#endif
29
30#define PyPARSE_PRINT_IS_FUNCTION       0x0004
31#define PyPARSE_UNICODE_LITERALS        0x0008
32
33
34
35PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int,
36                                              perrdetail *);
37PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int,
38                                             char *, char *, perrdetail *);
39
40PyAPI_FUNC(node *) PyParser_ParseStringFlags(const char *, grammar *, int,
41                                              perrdetail *, int);
42PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, grammar *,
43						 int, char *, char *,
44						 perrdetail *, int);
45PyAPI_FUNC(node *) PyParser_ParseFileFlagsEx(FILE *, const char *, grammar *,
46						 int, char *, char *,
47						 perrdetail *, int *);
48
49PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *,
50					      const char *,
51					      grammar *, int,
52                                              perrdetail *, int);
53PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilenameEx(const char *,
54					      const char *,
55					      grammar *, int,
56                                              perrdetail *, int *);
57
58/* Note that he following function is defined in pythonrun.c not parsetok.c. */
59PyAPI_FUNC(void) PyParser_SetError(perrdetail *);
60
61#ifdef __cplusplus
62}
63#endif
64#endif /* !Py_PARSETOK_H */