Hello,

My %union is declared in the following way and does have the proper
header file included but I still get errors that should not be there.

%union{
             float fconst;
             int type;
             astNode* node;
             string* name;
             nodeList* list;
       }

Here are the errors that I get when trying to compile the bison
generated file

In file included from misery.ll:30:
gram.yy:26: error: ISO C++ forbids declaration of `astNode' with no type
gram.yy:26: error: expected `;' before '*' token
gram.yy:27: error: ISO C++ forbids declaration of `string' with no type
gram.yy:27: error: expected `;' before '*' token
gram.yy:28: error: ISO C++ forbids declaration of `nodeList' with no
type
gram.yy:28: error: expected `;' before '*' token

I just don't see what I am doing wrong.

Your help is appreciated.




_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to