Node:Invocation, Next:Table of Symbols, Previous:Debugging, Up:Top
The usual way to invoke Bison is as follows:
bison infile
Here infile is the grammar file name, which usually ends in
.y. The parser file's name is made by replacing the .y
with .tab.c. Thus, the bison foo.y filename yields
foo.tab.c, and the bison hack/foo.y filename yields
hack/foo.tab.c. It's is also possible, in case you are writing
C++ code instead of C in your grammar file, to name it foo.ypp
or foo.y++. Then, the output files will take an extention like
the given one as input (repectively foo.tab.cpp and foo.tab.c++).
This feature takes effect with all options that manipulate filenames like
-o or -d.
For example :
bison -d infile.yxx
will produce infile.tab.cxx and infile.tab.hxx. and
bison -d infile.y -o output.c++
will produce output.c++ and outfile.h++.