I write a sets evaluation program with flex and bison.
I face a problem with error
bison -d calc.y
flex calc.l
cc -o a.out calc.tab.c lex.yy.c -lfl
calc.y: In function 'yyparse':
calc.y:25: error: request for member 'exp' in something not a structure or union
calc.y:25: error: request for member 'set' in something not a structure or union
calc.y:25: error: request for member 'set' in something not a structure or union
calc.y:26: error: request for member 'exp' in something not a structure or union
calc.y:26: error: request for member 'set' in something not a structure or union
calc.y:26: error: request for member 'set' in something not a structure or union
calc.y:27: error: request for member 'exp' in something not a structure or union
calc.y:27: error: request for member 'set' in something not a structure or union
calc.y:27: error: request for member 'set' in something not a structure or union
calc.y:30: error: request for member 'set' in something not a structure or union
calc.y:30: error: request for member 'string' in something not a structure or union
calc.y:31: error: request for member 'string' in something not a structure or union
calc.y:32: error: request for member 'set' in something not a structure or union
calc.y:32: error: request for member 'set' in something not a structure or union
* Error code 1
my platform information is as follow:
Compiler Version: gcc 4.2.1
Bison: 2.5.1
Flex: 2.5.4
Please help me to deal with above error, thanks very much!
The following links are my codes on Gist.
calc.l:gist.github.com/fbukevin/5662335
calc.y:gist.github.com/fbukevin/5662350
test.h:gist.github.com/fbukevin/5662533
Makefile:gist.github.com/fbukevin/5662359
(I don't have enough reputation to pose more than two link, so I took off "http://")