Multiple attributes in bison
问题 I am doing semantic analysis in bison and i want to use multiple attribute associated with a token. A related part of my code is: %union semrec { int Type; char *id; } %start prog %token <id> tIDENT Here, i can only use the "id" attribute witht the tIDENT token. I also want to associate the "Type" attribute with tIDENT token. To do this, i tried the following: %token <id> tIDENT %token <Type> tIDENT But it gives me a redeclaration warning for token tIDENT. I also tried the following: %token