Re: bison and C++ exceptions

2011-05-25 Thread Sergey Klimkin
some semantic action { $$ = new SomeType; // no exception $$->push_back(*$1); // no exception $$->push_back(*$2); // throws bad_alloc, $1, $2 leaks } and I have no idea how to work with M4: ( 2011/5/26 Hans Aberg > On 24 May 2011, at 20:32, Sergey Klimkin wrote: > &g

bison and C++ exceptions

2011-05-24 Thread Sergey Klimkin
Hi! Trying to find information about C++ exceptions in semantic actions, with no results. Is there any Bison %Decl which allows to move parse stack outside yyparse(), to destroy a stack values after an exception was thrown within semantic action!? something like: yyparse_stack my_stack; try {