Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 1 | |
Guido van Rossum | 85a5fbb | 1990-10-14 12:07:46 +0000 | [diff] [blame] | 2 | /* Parser-tokenizer link interface */ |
| 3 | |
Fred Drake | 5eb6d4e | 2000-07-08 23:37:28 +0000 | [diff] [blame] | 4 | #ifndef Py_PARSETOK_H |
| 5 | #define Py_PARSETOK_H |
| 6 | #ifdef __cplusplus |
| 7 | extern "C" { |
| 8 | #endif |
| 9 | |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 10 | typedef struct { |
Fred Drake | 5eb6d4e | 2000-07-08 23:37:28 +0000 | [diff] [blame] | 11 | int error; |
| 12 | char *filename; |
| 13 | int lineno; |
| 14 | int offset; |
| 15 | char *text; |
Fred Drake | 85f3639 | 2000-07-11 17:53:00 +0000 | [diff] [blame] | 16 | int token; |
| 17 | int expected; |
Guido van Rossum | b6775db | 1994-08-01 11:34:53 +0000 | [diff] [blame] | 18 | } perrdetail; |
| 19 | |
Tim Peters | fe2127d | 2001-07-16 05:37:24 +0000 | [diff] [blame] | 20 | #define PyPARSE_YIELD_IS_KEYWORD 0x0001 |
| 21 | |
Fred Drake | 5eb6d4e | 2000-07-08 23:37:28 +0000 | [diff] [blame] | 22 | extern DL_IMPORT(node *) PyParser_ParseString(char *, grammar *, int, |
| 23 | perrdetail *); |
| 24 | extern DL_IMPORT(node *) PyParser_ParseFile (FILE *, char *, grammar *, int, |
| 25 | char *, char *, perrdetail *); |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 26 | |
Tim Peters | fe2127d | 2001-07-16 05:37:24 +0000 | [diff] [blame] | 27 | extern DL_IMPORT(node *) PyParser_ParseStringFlags(char *, grammar *, int, |
| 28 | perrdetail *, int); |
| 29 | extern DL_IMPORT(node *) PyParser_ParseFileFlags(FILE *, char *, grammar *, |
| 30 | int, char *, char *, |
| 31 | perrdetail *, int); |
| 32 | |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 33 | #ifdef __cplusplus |
| 34 | } |
| 35 | #endif |
| 36 | #endif /* !Py_PARSETOK_H */ |