[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %union, C++, symbol types
From: |
Laurence Finston |
Subject: |
Re: %union, C++, symbol types |
Date: |
Thu, 7 Jul 2005 12:29:14 +0200 (MEST) |
On Wed, 6 Jul 2005, Evan Lavelle wrote:
> Is there anything new in Bison that could help with this (I'm on
> 1.875c)? Or can anyone suggest a work-around?
>
I like using 'void*' as one of the types in the '%union'.
I then use 'static_cast' in the rules, since the actual type
is known at compile-time. I am currently in the process of
replacing the code in all of the actions where there is a significant
amount of code with calls to functions. (I wish I had written the parser
this way in the first place.) In such cases, I usually don't bother
casting in the action and pass a 'void*' to the function.
Laurence Finston
- %union, C++, symbol types, Evan Lavelle, 2005/07/06
- Re: %union, C++, symbol types, Tim Van Holder, 2005/07/07
- Re: %union, C++, symbol types,
Laurence Finston <=
- Re: %union, C++, symbol types, Hans Aberg, 2005/07/07
- Re: %union, C++, symbol types, Evan Lavelle, 2005/07/19