Hi all, I am trying to build an architecture simulator (http:// cva.stanford.edu/books/ppin/#sim) that uses flex with bison to generate some code. I'm not extremely familiar with either tool. It first uses flex to generate configlex.cpp from config.l: flex -Pconfig -oconfiglex.cpp config.l
Here is config.l and configlex.cpp, respectively: http://pastebin.com/f746a6b77 http://pastebin.com/f598c894e Line 18 in config.l has: unsigned int configlineno = 1; After flex runs, configlex.cpp generates:extern int configlineno; // line 361 int configlineno = 1; // line 363unsigned int configlineno = 1; // line 493 This obviously creates a problem when it tries to build: config.l:18: error: conflicting declaration 'unsigned int configlineno' configlex.cpp:363: error: 'configlineno' has a previous declaration as 'int configlineno' Why does it generate both an int and an unsigned int? I would appreciate any feedback. Thanks! George