help-bison
[Top][All Lists]
Advanced

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

Customizing display of tokens(%print?)


From: Frans Englich
Subject: Customizing display of tokens(%print?)
Date: Fri, 1 Jun 2007 14:49:31 +0200
User-agent: KMail/1.9.1

Hello,

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.)


Cheers,

                Frans




reply via email to

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