source: trunk/essentials/dev-lang/python/Parser/pgenmain.c@ 3393

Last change on this file since 3393 was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 3.3 KB
Line 
1
2/* Parser generator main program */
3
4/* This expects a filename containing the grammar as argv[1] (UNIX)
5 or asks the console for such a file name (THINK C).
6 It writes its output on two files in the current directory:
7 - "graminit.c" gets the grammar as a bunch of initialized data
8 - "graminit.h" gets the grammar's non-terminals as #defines.
9 Error messages and status info during the generation process are
10 written to stdout, or sometimes to stderr. */
11
12/* XXX TO DO:
13 - check for duplicate definitions of names (instead of fatal err)
14*/
15
16#include "Python.h"
17#include "pgenheaders.h"
18#include "grammar.h"
19#include "node.h"
20#include "parsetok.h"
21#include "pgen.h"
22
23int Py_DebugFlag;
24int Py_VerboseFlag;
25int Py_IgnoreEnvironmentFlag;
26
27/* Forward */
28grammar *getgrammar(char *filename);
29