parsetok.h 940 Bytes
Newer Older
1

Guido van Rossum's avatar
Guido van Rossum committed
2 3
/* Parser-tokenizer link interface */

4 5 6 7 8 9
#ifndef Py_PARSETOK_H
#define Py_PARSETOK_H
#ifdef __cplusplus
extern "C" {
#endif

10
typedef struct {
11 12 13 14 15
    int error;
    char *filename;
    int lineno;
    int offset;
    char *text;
16 17
    int token;
    int expected;
18 19
} perrdetail;

20
#if 0
21
#define PyPARSE_YIELD_IS_KEYWORD	0x0001
22
#endif
23

24 25 26 27
extern DL_IMPORT(node *) PyParser_ParseString(char *, grammar *, int,
                                              perrdetail *);
extern DL_IMPORT(node *) PyParser_ParseFile (FILE *, char *, grammar *, int,
                                             char *, char *, perrdetail *);
28

29 30 31 32 33 34
extern DL_IMPORT(node *) PyParser_ParseStringFlags(char *, grammar *, int,
                                              perrdetail *, int);
extern DL_IMPORT(node *) PyParser_ParseFileFlags(FILE *, char *, grammar *,
						 int, char *, char *,
						 perrdetail *, int);

35 36 37 38
#ifdef __cplusplus
}
#endif
#endif /* !Py_PARSETOK_H */