When Bison prints error messages for symbols, it doesn't take into
account
possible semantic values. For instance, it says "unexpected <literal>,
expected foo".
What would be much more helpful is if it printed the semantic
values instead.
For instance, "123" instead of "<literal>" and "myVariable" instead of
"<identifier>".
I first thought that the %print-feature, mysteriously used in
examples but not
documented, did this. But it's a whole feature for the purpose of
improving... /debug/ output?
Is there any way to register code for printing helpful token
descriptions?
(Yes, there is %token name "string" when it is known statically.)