Bison + flex kompilator
Mam pewien problem z lexem . Do pliku lex i parsera dolaczona jest struktura:
struct type
{
int intval;
char *id;
};
typedef struct type type;
#define YYSTYPE type
gcc przy probie kompilacji wyrzuca blad: request for member 'intval' in something not structure or union dla linii kodu :
[0-9]+ { yylval.intval = atoi(yytext); return NUM; }
Przegrzebałam google i niestety nic nie pomogło. Próbowałam przerabiać na union w parserze, ale gcc zwraca to samo. Cóż począć :)?