[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %destructor feedback
From: |
Joel E. Denny |
Subject: |
Re: %destructor feedback |
Date: |
Thu, 5 Jan 2006 13:33:13 -0500 (EST) |
On Thu, 5 Jan 2006, Akim Demaille wrote:
> >>> "Joel" == Joel E Denny <address@hidden> writes:
>
> > On Wed, 4 Jan 2006, Akim Demaille wrote:
> >> Le 4 janv. 06 à 20:29, Joel E. Denny a écrit :
> >>
> >> > I don't see $<foo>3 as simply a waste of characters. I see it as
> >> > misleading. It begs the question, "What does `foo' mean?".
> >>
> >> Well, I wrote foo, but I should have written the actual member name:
> >> $<val>3. That's what is needed anyway in the action itself when
> >> assigning to $$ (well, $<val>$).
>
> > OK, but that's not enforced.
>
> It never is. Bison is not aware of the names of the %union member
> (and IMHO, it doesn't have to).
I realize that. I don't believe it has to either... especially
considering that it would require parsing C or, worse, C++. However, in
all other cases I can think of, the compiler will catch an invalid union
member. In this case, the compiler never sees it.
I've just inadvertently made an argument for exposing the internal
YYUSE....
Nevertheless, even if the compiler sees it, you can put any irrelevant
union member there, and it seems strange to have to specify one at all.
Joel
- Re: %destructor feedback, (continued)
- Re: %destructor feedback, Akim Demaille, 2006/01/03
- Re: %destructor feedback, Akim Demaille, 2006/01/04
- Re: %destructor feedback, Joel E. Denny, 2006/01/04
- Re: %destructor feedback, Frank Heckenbach, 2006/01/04
- Re: %destructor feedback, Joel E. Denny, 2006/01/04
- Re: %destructor feedback, Akim Demaille, 2006/01/04
- Re: %destructor feedback, Joel E. Denny, 2006/01/04
- Re: %destructor feedback, Akim Demaille, 2006/01/05
- Re: %destructor feedback,
Joel E. Denny <=
- Re: %destructor feedback, Paul Eggert, 2006/01/04
- Re: %destructor feedback, Akim Demaille, 2006/01/05