[Top][All Lists]

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

Re: Featuritis: Token actions

From: Hans Aberg
Subject: Re: Featuritis: Token actions
Date: Sat, 26 Jul 2003 20:48:35 +0200

At 00:31 +0200 2003/07/26, Frank Heckenbach wrote:
>> >BTW, I think we'd get essentially the same power if there was a way
>> >to stick actions to a token (independent of the token value), i.e.
>> >basically just a way to invoke some user-defined routine when a
>> >token is shifted. This would shift (pun intended) some work from
>> >bison (no queue required) to the user's code -- I don't know what's
>> >generally considered preferable ...
>> You can do this too, but then you can't insert new tokens as you please
>> anywhere in the grammar.
>No, one would have to stick the actions to the following real token.

If debugging is the intent, then only non-grammar action tokens seems to be
useful. One can then use them to insert debugging information at the
correct points, even if one is building some code that will only be
combined/executed later.

I am facing some such problems now, where I build a chunk that is executed
later. Then lexer actions fails to turn the debugging on/off as one would

>> Well, if you agree with me, then it is only to start implement it into
>I'm afraid I currently don't have the time for it, and I'm still
>dealing with several other issues with Bison.

Well, that is the usual featuritis problem. :-)

> Also, as I said, I've
>solved my needs (ab)using locations, so I don't really have the
>"great need" now. It might have been useful some months ago, but now
>it would mean double extra work for me (implementing it in Bison and
>changing my code to the new model).

The difference is that these token actions do will not rely on some risky
code abuse, and will do the job more exactly.

>... So, perhaps someday when I have
>the time, but don't count on it ...

So I guess if or somebody else what to implement very detailed debugging,
then this feature might become pertinent.

  Hans Aberg

reply via email to

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