bison-patches
[Top][All Lists]
Advanced

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

Re: FYI: default %printer/%destructor


From: Hans Aberg
Subject: Re: FYI: default %printer/%destructor
Date: Sun, 19 Nov 2006 23:28:47 +0100

On 19 Nov 2006, at 23:04, Joel E. Denny wrote:

Ok, I think I miscommunicated. The ambiguity I meant is whether `b/c' is the same as `b/ c' as discussed below. `c :b' and `c:b' have the same
issue....

I think there should be normal tokenization the Bison .l file, with a general rule, stripping out space and newlines. I think this leads to the most
intuitive grammar.

I was thinking of the human reader not Bison's scanner.

Me too.

The %destructor is only needed with output language C.

Currently, it's also useful for C++.

You mean, of one writes code in the common C/C++ subset. :-)

There could be other target
languages some day that need it as well

Perhaps, but I can't really think of any.

If we use `:' for value names ...

WHat do you mean by value names, here? Is that the semantic value variables?

Yes.

Then I think ":" should be avoided.

You mean exp:r?  I don't see how that's easier.

It depends what comes first in the definition. It is easier implementing with
defined names first, and then the definee.

I don't see how either is easier to implement than the other.

I guess this is something that show when tried. :-) I don't really know.

How do you declare that the semantic value is unused but still use the
location?  Will we make the gamble that this is never necessary?

I haven't considered this. Now that you mention this, I think some special notation might be the prudent way. The location value will probably be used more often with Bison improved parser diagnostics. This suggests that one
indeed needs some special way to indicate it.

Ok, I hope you'll respond to my other email where I propose a more concise
alternative to exp($sum, @sum).

I will look at this, but tomorrow - it is getting late here. :-)

  Hans Aberg






reply via email to

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