~inkscape.dev/inkscape-devlibs64/trunk

34 by Eduard Braun
Update Python to version 2.7.12
1
/* Parser-tokenizer link interface */
2
3
#ifndef Py_PARSETOK_H
4
#define Py_PARSETOK_H
5
#ifdef __cplusplus
6
extern "C" {
7
#endif
8
9
typedef struct {
10
    int error;
11
    const char *filename;
12
    int lineno;
13
    int offset;
14
    char *text;
15
    int token;
16
    int expected;
17
} perrdetail;
18
19
#if 0
20
#define PyPARSE_YIELD_IS_KEYWORD	0x0001
21
#endif
22
23
#define PyPARSE_DONT_IMPLY_DEDENT	0x0002
24
25
#if 0
26
#define PyPARSE_WITH_IS_KEYWORD		0x0003
27
#endif
28
29
#define PyPARSE_PRINT_IS_FUNCTION       0x0004
30
#define PyPARSE_UNICODE_LITERALS        0x0008
31
32
33
34
PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int,
35
                                              perrdetail *);
36
PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int,
37
                                             char *, char *, perrdetail *);
38
39
PyAPI_FUNC(node *) PyParser_ParseStringFlags(const char *, grammar *, int,
40
                                              perrdetail *, int);
41
PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, grammar *,
42
						 int, char *, char *,
43
						 perrdetail *, int);
44
PyAPI_FUNC(node *) PyParser_ParseFileFlagsEx(FILE *, const char *, grammar *,
45
						 int, char *, char *,
46
						 perrdetail *, int *);
47
48
PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *,
49
					      const char *,
50
					      grammar *, int,
51
                                              perrdetail *, int);
52
PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilenameEx(const char *,
53
					      const char *,
54
					      grammar *, int,
55
                                              perrdetail *, int *);
56
57
/* Note that he following function is defined in pythonrun.c not parsetok.c. */
58
PyAPI_FUNC(void) PyParser_SetError(perrdetail *);
59
60
#ifdef __cplusplus
61
}
62
#endif
63
#endif /* !Py_PARSETOK_H */
64