I'd like to have an API to convert between state numbers (as defined by the external "lexer" constant) and their string representation.
There is an internal function that sort of do it - yyTokname but there is a magical offset between what the yacc internal code call state number, and the defined constant. And the magical constant differ between 1.4 and 1.5. For the other direction one have to go the yyToknames table itself, again with (a slightly different) magic offset that differ between version.
So the request is for simple API to do this conversion (an alternative is to give some type to the constant and then we can use the stringer tool).
The text was updated successfully, but these errors were encountered: