help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customizing display of tokens(%print?)


From: Hans Aberg
Subject: Re: Customizing display of tokens(%print?)
Date: Fri, 1 Jun 2007 19:34:44 +0200

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]