On 1 Jun 2007, at 14:49, Frans Englich wrote:
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.)
I think that better error reporting is on the todo list, but for now,
one can tweak the skeleton file.
Hans Aberg
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison