I want to add struct in union in a yacc file but I found this error:
"error : member 'Info YYSTYPE ::info' with constructor not allowed in union "
%{
#include <cstdio>
#include <iostream>
using namespace std;
 extern "C" int yylex();                         
 extern "C" int yyparse();             
 extern "C" FILE *yyin;                
 struct Info{ int intval; float floatval; string stringval ;int type; } 
void yyerror(const char *s);
%}
%union {  
int ival;
float fval;
char *sval;
struct Info info;
}