Hello, On 28.09.2005, Hans Aberg wrote: > On 28 Sep 2005, at 14:37, Jan Nabbefeld wrote: > I use a C++ polymorphic hierarchy, with a reference count at the > base, in order to avoid unnecessary copying. > This approach has also the advantage of making use of C++ cleanup > The code above then becomes: > > cd_list: /* empty */ {$$=0;} > | cd_list cd { $$ = new NRec(token, _CD_LIST, $1, $2, _CD); } > ; > [snip]
That's a nice solution but unfortunately no option for me. As I mentioned, there is no way for me to change the semantic actions. My mission is to rebuild an existing C implemented scanner/parser in C++. The semantic actions have to be untouched (as far as possible). > >I know lalr1.cc skeleton is experimantal and not supported so I > >don't complain about that. Would be nice to have the possibility > >again without customize the skeleton. > When Akim has finished the writing of %define, customizing will be > easy. Whats the plan? Can you give some details? The idea of defining code snippets via the %defines statements sounds good and was nicely implemented by %define root ... (at least for me ;-)). _______________________________________________ Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison