parsetok.h revision 4d6ec85a022d05f11966004edc36151ab26bb13a
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#define PyPARSE_PRINT_IS_FUNCTION 0x0004 29#define PyPARSE_UNICODE_LITERALS 0x0008 30#endif 31 32PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int, 33 perrdetail *); 34PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int, 35 char *, char *, perrdetail *); 36 37PyAPI_FUNC(node *) PyParser_ParseStringFlags(const char *, grammar *, int, 38 perrdetail *, int); 39PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, 40 const char*, grammar *, 41 int, char *, char *, 42 perrdetail *, int); 43PyAPI_FUNC(node *) PyParser_ParseFileFlagsEx(FILE *, const char *, 44 const char*, grammar *, 45 int, char *, char *, 46 perrdetail *, int *); 47 48PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *, 49 const char *, 50 grammar *, int, 51 perrdetail *, int); 52PyAPI_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. */ 58PyAPI_FUNC(void) PyParser_SetError(perrdetail *); 59 60#ifdef __cplusplus 61} 62#endif 63#endif /* !Py_PARSETOK_H */ 64