blob: 71e7d899436d0a3e54c395a7ce8fee3b96a7f43d [file] [log] [blame]
Guido van Rossumf70e43a1991-02-19 12:39:46 +00001/***********************************************************
Guido van Rossumfd71b9e2000-06-30 23:50:40 +00002Copyright (c) 2000, BeOpen.com.
3Copyright (c) 1995-2000, Corporation for National Research Initiatives.
4Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
5All rights reserved.
Guido van Rossumf70e43a1991-02-19 12:39:46 +00006
Guido van Rossumfd71b9e2000-06-30 23:50:40 +00007See the file "Misc/COPYRIGHT" for information on usage and
8redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Guido van Rossumf70e43a1991-02-19 12:39:46 +00009******************************************************************/
10
Guido van Rossum85a5fbb1990-10-14 12:07:46 +000011/* Parser-tokenizer link interface */
12
Fred Drake5eb6d4e2000-07-08 23:37:28 +000013#ifndef Py_PARSETOK_H
14#define Py_PARSETOK_H
15#ifdef __cplusplus
16extern "C" {
17#endif
18
Guido van Rossumb6775db1994-08-01 11:34:53 +000019typedef struct {
Fred Drake5eb6d4e2000-07-08 23:37:28 +000020 int error;
21 char *filename;
22 int lineno;
23 int offset;
24 char *text;
Fred Drake85f36392000-07-11 17:53:00 +000025 int token;
26 int expected;
Guido van Rossumb6775db1994-08-01 11:34:53 +000027} perrdetail;
28
Fred Drake5eb6d4e2000-07-08 23:37:28 +000029extern DL_IMPORT(node *) PyParser_ParseString(char *, grammar *, int,
30 perrdetail *);
31extern DL_IMPORT(node *) PyParser_ParseFile (FILE *, char *, grammar *, int,
32 char *, char *, perrdetail *);
Guido van Rossuma3309961993-07-28 09:05:47 +000033
34#ifdef __cplusplus
35}
36#endif
37#endif /* !Py_PARSETOK_H */