mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 00:03:03 +00:00
* doc/bison.texinfo: Update.
* doc/bison.1 (mandoc): Update. * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h. * src/files.c: Support output files extensions computing. (src_extension): New static variable. (header_extension): New static variable. (tr): New function. (get_extension_index): New function, gets the index of an extension filename in a string. (compute_exts_from_gf): New function, computes extensions from the grammar file extension. (compute_exts_from_src): New functions, computes extensions from the C source file extension, file given by ``-o'' option. (compute_base_names): Update. (output_files): Update.
This commit is contained in:
@@ -857,7 +857,20 @@ Invoking Bison
|
||||
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'.
|
||||
hack/foo.y' filename yields `hack/foo.tab.c'. It's is also possible, in
|
||||
case you are writting 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++'.
|
||||
|
||||
* Menu:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user