Hi,
I'm using bison, and giving it an input parser named foo.yxx. Doing
this has it generate a foo.cxx file. So, I use g++ to compile the
generated parser.
I'm using the %union declaration described here,
http://www.gnu.org/software/bison/manual/html_mono/
bison.html#Union-Decl
How come if I do
%union {
std::string *foo;
}
I get,
error: expected specifier-qualifier-list before ‘std’
I found a work around, which is to do
struct s {
std::string foo;
};
%union {
struct s *foo;
};
Do I have to do it this way? Is there a better work around?
Thanks,
Bob Rossi