I have one file with declarations of my tokens declarations.h:
#define ID 257
#define NUM 258
...
In my flex code i return one of this values or symbol(for example '+', '-', '*'). And everything works.
The problem in bison file. If i write something like that: exp: ID '+' ID i'll get error, because bison doesn't know anything about ID. Adding the line %token ID will not help, because in that case i'll have compilation error(preprocessor will change ID by 257 and i'll get 257=257)