blob: 66359d42521673ae118551eb0ab6662d6a8d3867 [file] [log] [blame]
Guido van Rossumf70e43a1991-02-19 12:39:46 +00001
Guido van Rossum85a5fbb1990-10-14 12:07:46 +00002/* Parser-tokenizer link interface */
3
Fred Drake5eb6d4e2000-07-08 23:37:28 +00004#ifndef Py_PARSETOK_H
5#define Py_PARSETOK_H
6#ifdef __cplusplus
7extern "C" {
8#endif
9
Guido van Rossumb6775db1994-08-01 11:34:53 +000010typedef struct {
Fred Drake5eb6d4e2000-07-08 23:37:28 +000011 int error;
12 char *filename;
13 int lineno;
14 int offset;
15 char *text;
Fred Drake85f36392000-07-11 17:53:00 +000016 int token;
17 int expected;
Guido van Rossumb6775db1994-08-01 11:34:53 +000018} perrdetail;
19
Tim Petersfe2127d2001-07-16 05:37:24 +000020#define PyPARSE_YIELD_IS_KEYWORD 0x0001
21
Fred Drake5eb6d4e2000-07-08 23:37:28 +000022extern DL_IMPORT(node *) PyParser_ParseString(char *, grammar *, int,
23 perrdetail *);
24extern DL_IMPORT(node *) PyParser_ParseFile (FILE *, char *, grammar *, int,
25 char *, char *, perrdetail *);
Guido van Rossuma3309961993-07-28 09:05:47 +000026
Tim Petersfe2127d2001-07-16 05:37:24 +000027extern DL_IMPORT(node *) PyParser_ParseStringFlags(char *, grammar *, int,
28 perrdetail *, int);
29extern DL_IMPORT(node *) PyParser_ParseFileFlags(FILE *, char *, grammar *,
30 int, char *, char *,
31 perrdetail *, int);
32
Guido van Rossuma3309961993-07-28 09:05:47 +000033#ifdef __cplusplus
34}
35#endif
36#endif /* !Py_PARSETOK_H */