User Profile
Collapse
-
yes. This is the way we declare a union at bison. In fact, I got it from an exemple I found in a book about flex and bison. -
Thanks donbock for your reply.
I've tried removing the "typedef" but the error remains the same.
When I let the "typedef" and remove the "enum" (in "typeval" definition) I start getting too many errors.
I don't know what I'm doing wrong...Leave a comment:
-
First of all, thanks for your reply...
I don't think this is due to cygwin because the program compiled without any problem before I added that enum. :-(Leave a comment:
-
error: field has incomplete type
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':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
-
I've renamed the token and now it works.
Thanks for all those who replied to my question!Leave a comment:
-
Hi again,
In fact I removed the lines "EOF=272" & "#define EOF 272" and the error disappeared... I guess there was a name collision or something like that...Leave a comment:
-
error: expected identifier before ‘(’ token
Hi!
I'm working on a mini compiler with flex and bison. The ".l" and ".y" files are generated successfully. However, when I try to compile the hole thing using the command "gcc -o comp comp.tab.c lex.yy.c ", I keep having this error :-(
In file included from comp.l:4:
comp.tab.h:56: error: expected identifier before ‘(’ token
It's supposed to be a syntax error but I honestly...
No activity results to display
Show More
Leave a comment: