Is it the C-parser you compile as C++? The "specifier-qualifier-list"
seems to be a C-thing; see line 50 of
http://home.att.ne.jp/omega/kikuchi/036.html
Hans Aberg
On 24 Feb 2007, at 19:09, Bob Rossi wrote:
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
_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison