Hi, when using "%defines" or "--defines", bison generates the normal C++ file, the header (whose name can be set with "--defines") and 3 more files, position.hh, location.hh and stack.hh whose names apparently cannot be changed.
I think that's not nice for at least two reasons: - When using several C++ bison parsers in the same source directory (I'm not doing this now, but I might in the future), they would overwrite each other. Even if the contents might be the same, this seems strange. - To write a proper Makefile, one should remove those files in one of the *clean rules. Should one hard code those 3 names? Might bison add another one in the future? Or, more dangerous, might it get rid of (some of) them? Then, much later, someone else might unknowingly use one of those names for a real source file and have it deleted accidentally. (Same if the source stops using bison sometime in the future.) So, isn't there some way to rename those files, either based on the bison source file name, or by a command-line option or directive, or at least, if still hard coded, in a way that clearly marks them as bison outputs, e.g. bison-generated-foo.hh? (I know they're not generated when no header is requested, but I need the header for my scanner and driver.) Regards, Frank