Hi everybody!!
I'm actually trying to construct a compiler with flex and bison. But when I try to compile the"lex.yy.c" file on cygwin I keep having this error:
In fact, typeval's type is an enum 'type' that I've defined in 'ST.h':
and tht I'v included in 'Simple.y':
I really don't know what to do in order to fix this error :-(
Help pleeease! It's urgent...
I'm actually trying to construct a compiler with flex and bison. But when I try to compile the"lex.yy.c" file on cygwin I keep having this error:
Code:
$gcc -c lex.yy.c In file included from Simple.l:4 Simple.y:60: error: field 'typeval' has incomplete type
Code:
typedef enum type type;
enum type {Int, Bool} ;
Code:
#ifndef ST_H
#define ST_H
#include "ST.h"
#endif
......
%union semrec { int intval;
char *id;
enum type typeval; //line: 60
struct lbs *lbls; }
Help pleeease! It's urgent...
Comment