blob: cd6319361d5b94908ed09764629954cf7efe5edb [file] [log] [blame]
Guido van Rossuma3309961993-07-28 09:05:47 +00001#ifndef Py_PGENHEADERS_H
2#define Py_PGENHEADERS_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
Guido van Rossumf70e43a1991-02-19 12:39:46 +00007/***********************************************************
Guido van Rossum5799b521995-01-04 19:06:22 +00008Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
9The Netherlands.
Guido van Rossumf70e43a1991-02-19 12:39:46 +000010
11 All Rights Reserved
12
Guido van Rossumd266eb41996-10-25 14:44:06 +000013Permission to use, copy, modify, and distribute this software and its
14documentation for any purpose and without fee is hereby granted,
Guido van Rossumf70e43a1991-02-19 12:39:46 +000015provided that the above copyright notice appear in all copies and that
Guido van Rossumd266eb41996-10-25 14:44:06 +000016both that copyright notice and this permission notice appear in
Guido van Rossumf70e43a1991-02-19 12:39:46 +000017supporting documentation, and that the names of Stichting Mathematisch
Guido van Rossumd266eb41996-10-25 14:44:06 +000018Centrum or CWI or Corporation for National Research Initiatives or
19CNRI not be used in advertising or publicity pertaining to
20distribution of the software without specific, written prior
21permission.
Guido van Rossumf70e43a1991-02-19 12:39:46 +000022
Guido van Rossumd266eb41996-10-25 14:44:06 +000023While CWI is the initial source for this software, a modified version
24is made available by the Corporation for National Research Initiatives
25(CNRI) at the Internet address ftp://ftp.python.org.
26
27STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
28REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
29MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
30CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
31DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
32PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
33TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
34PERFORMANCE OF THIS SOFTWARE.
Guido van Rossumf70e43a1991-02-19 12:39:46 +000035
36******************************************************************/
37
Guido van Rossumff18df01994-08-29 10:55:19 +000038/* Include files and extern declarations used by most of the parser. */
Guido van Rossum3f5da241990-12-20 15:06:42 +000039
Guido van Rossumb6775db1994-08-01 11:34:53 +000040#include "config.h"
Guido van Rossumb6775db1994-08-01 11:34:53 +000041
Guido van Rossumb221ac41996-05-22 17:28:54 +000042/* config.h may or may not define DL_IMPORT */
43#ifndef DL_IMPORT /* declarations for DLL import/export */
44#define DL_IMPORT(RTYPE) RTYPE
45#endif
46
Guido van Rossum3f5da241990-12-20 15:06:42 +000047#include <stdio.h>
Guido van Rossumb156d721990-12-20 23:13:00 +000048#include <string.h>
Guido van Rossum3f5da241990-12-20 15:06:42 +000049
Guido van Rossumb6775db1994-08-01 11:34:53 +000050#ifdef HAVE_STDLIB_H
Guido van Rossumb156d721990-12-20 23:13:00 +000051#include <stdlib.h>
52#endif
Guido van Rossumb156d721990-12-20 23:13:00 +000053
Guido van Rossumb6775db1994-08-01 11:34:53 +000054#include "myproto.h"
Guido van Rossum1e28e5e1992-08-19 16:46:30 +000055#include "mymalloc.h"
Guido van Rossum3f5da241990-12-20 15:06:42 +000056
Guido van Rossumb221ac41996-05-22 17:28:54 +000057#include "pydebug.h"
Guido van Rossuma3309961993-07-28 09:05:47 +000058
Guido van Rossum1d2e9d11998-09-17 14:00:22 +000059#ifdef HAVE_STDARG_PROTOTYPES
Guido van Rossum43466ec1998-12-04 18:48:25 +000060DL_IMPORT(void) PySys_WriteStdout(const char *format, ...);
61DL_IMPORT(void) PySys_WriteStderr(const char *format, ...);
Guido van Rossum1d2e9d11998-09-17 14:00:22 +000062#else
63/* Better to have no prototypes at all for varargs functions in this case */
Guido van Rossum43466ec1998-12-04 18:48:25 +000064DL_IMPORT(void) PySys_WriteStdout();
65DL_IMPORT(void) PySys_WriteStderr();
Guido van Rossum1d2e9d11998-09-17 14:00:22 +000066#endif
67
Guido van Rossum5048de21996-05-24 20:43:31 +000068#define addarc _Py_addarc
69#define addbit _Py_addbit
70#define adddfa _Py_adddfa
71#define addfirstsets _Py_addfirstsets
72#define addlabel _Py_addlabel
73#define addstate _Py_addstate
74#define delbitset _Py_delbitset
75#define dumptree _Py_dumptree
76#define findlabel _Py_findlabel
77#define mergebitset _Py_mergebitset
78#define meta_grammar _Py_meta_grammar
79#define newbitset _Py_newbitset
80#define newgrammar _Py_newgrammar
81#define pgen _Py_pgen
82#define printgrammar _Py_printgrammar
83#define printnonterminals _Py_printnonterminals
84#define printtree _Py_printtree
85#define samebitset _Py_samebitset
86#define showtree _Py_showtree
87#define tok_dump _Py_tok_dump
88#define translatelabels _Py_translatelabels
89
Guido van Rossuma3309961993-07-28 09:05:47 +000090#ifdef __cplusplus
91}
92#endif
93#endif /* !Py_PGENHEADERS_H */