Re: stl constructs inside the union block

2007-10-05 Thread lfinsto1
The `%union' declaration for GNU 3DLDF looks like this: %union { char string_value[64]; double real_value; signed int int_value; unsigned long long ulong_long_value; void* pointer_value; }; I use the members of the union other than `pointer_value' for the values of symbols where it's co

Re: stl constructs inside the union block

2007-10-05 Thread lfinsto1
> On 2 Oct 2007, at 23:48, Randy Smith wrote: > >> I'm trying to incorporate c++ stl constructs into the %union { } >> block of yacc. Specifically, I'm trying to do something similar to >> this: >> >> %union { >> ... >>std::list* int_list; >> ... >> } >> >> This yields the error: >> >> eidd.y:

Re: stl constructs inside the union block

2007-10-04 Thread lfinsto1
> > One solution to this (and the solution I used), is to define > a simple class that wraps a pointer of this type. This works fine, but > it is a bit of a kludge, and I'm really curious why the direct stl > reference doesn't work. Can anybody explain this to me or point me to > a reference? >

Re: stl constructs inside the union block

2007-10-03 Thread Hans Aberg
On 2 Oct 2007, at 23:48, Randy Smith wrote: I'm trying to incorporate c++ stl constructs into the %union { } block of yacc. Specifically, I'm trying to do something similar to this: %union { ... std::list* int_list; ... } This yields the error: eidd.y:100: error: using-declaration for

stl constructs inside the union block

2007-10-02 Thread Randy Smith
I'm trying to incorporate c++ stl constructs into the %union { } block of yacc. Specifically, I'm trying to do something similar to this: %union { ... std::list* int_list; ... } This yields the error: eidd.y:100: error: using-declaration for non-member at class scope eidd.y:100: error: exp