From:  Hans Aberg 
------------------------------------------------------------------------------
--
> This discussion is very confusing, because it mixes two topics: 
> Extending C++, and what is appropriate for Bison. 

This is just my opinion, but I don't think adding type information to `union'
would be in the spirit of C.  If this feature were added, the first thing I'd
do would be to look for a way to turn it off.

> As for the latter 
> question, one would have to give iyt a different name that %union.
> But with the %typed and other features suggested here (%define), 
> that would not be a problem.

No, but what would be the advantage over something like the following?

struct Yystype_Struct
{
   unsigned short type;

   void* object;

};

I don't understand why you would want to use `union' at all.  Of course,
what's appropriate for Bison is up to the maintainers and developers, so I'll
stay out of that one.   From my point of view as a user, it's perfectly simple
to use `void*' in `%union', and I suspect that it will be perfectly simple to
use it as `YYSTYPE' (I haven't tried it yet). 
So what problem are you trying to solve?

Laurence 




_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to