Re: symbol_type::token () removed?
Akim Demaille <[email protected]>
| Newsgroups | gmane.comp.parsers.bison.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi guys, You have all been hit by the removal of symbol_type::token (), and I'm not sure yet what would be the best option for the future. We can introduce a %define variable that generates it (and its table) on user's request. But it's going to waste space, unless you use api.token.raw. For a number of reasons, I think it would make sense to expose the internal symbol numbers, so %token FOO 123 would be defined twice: once a TOK_FOO = 123 (the "external token number"), and YY_SYMBOL_FOO = 1 (the "internal symbol number"). (In C++ we can used something better looking). Would that be a good solution for you all? You would no longer need to convert from one number type to the other. Cheers!