help-bison
[Top][All Lists]
Advanced

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

Re: Finding out when a token is consumed


From: Hans Aberg
Subject: Re: Finding out when a token is consumed
Date: Thu, 1 May 2003 18:27:04 +0200

At 14:20 +0200 2003/05/01, Frank Heckenbach wrote:
>> We try to guess what you want.
>
>Sorry if my descriptions are so unclear. Basically, I'd like to do
>what I did in my original example, but preferably without (ab)using
>YYLLOC_DEFAULT, that's all.
>
>> If you want to attach a code snippet to each action without having to write
>> it out explicitly into each action, here are some suggestions:
>>
>> - The Bison file tests/actions.at has some code
>>   %printer { fprintf (yyout, "%d from %d", $$, @$.first_line); }
>>     input line thing 'x'
>
>%printer doesn't seem to be documented yet, but from what I've found
>(http://mail.gnu.org/archive/html/bison-patches/2002-06/msg00066.html,
>e.g.), it seems to be like YYPRINT (though token-specific). So it
>seems to be more for debugging and messages than for what I need.

So here the problem shows with you not describing what and why you want as
much as those that might help you need.

Essentially, you say that you need this esoteric property X, and somehow
draw the conclusion that Bison should be designed somehow to support it.

It is frequent in this group that when the original property X has been
properly described, a suitable proper remedy can be found. One is unlikely
to get Bison to support esoteric properties, because often they turn out to
wrong from the point of view of proper language design.

  Hans Aberg






reply via email to

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