Hello all,
As can be seen, I do a fair bit of post processing on my parser:
parser:
cd $(srcdir)
bison QueryTransformParser.ypp
mv QueryTransformParser.tab.cpp QueryTransformParser.cpp
mv QueryTransformParser.tab.hpp QueryTransformParser.h
sed -i -e 's/#define [0-9a-zA-Z_]\+ [0-9]\{3\}//'
$(srcdir)/QueryTransformParser.{cpp,h}
sed -i -e 's/#define END_OF_FILE 0//' $(srcdir)/QueryTransformParser.
{cpp,h}
The sed calls remove the defines for the YYTOKENTYPE so I can use the enum
without trouble.(yytokentype). The mv calls, obviously rename the outputted
parser.
Can I do these renames with bison directives? I would prefer if my .ypp file
was completely self contained and that I didn't have to do any
post-processing.
There is %file-prefix, but I don't see how it helps me since I don't want to
change the "QueryTransformParser" part. Then there is "%output" which the
Bison manual says "set the name of the parser file." I don't get what that
means, or how it differs from %file-prefix.
I already specify %defines and %name-prefix. I'm positive towards renaming
QueryTransformParser.ypp(such as changing the file extension) if that would
help.
Cheers,
Frans
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison