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


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

Reply via email to