My C++ bison parser has try/catch blocks sprinkled all over the semantic actions, but the catch block always does the same thing:
try { ... stuff ... } catch (CfdgError e) { error(e.where, e.what); YYABORT; } I use auto_ptrs to clean-up stray objects. I would like to get rid of all of these try/catch blocks and just have a single one around the parse() method: try { yyresult = parser.parse(); } catch (CfdgError e) { driver.error(e.where, e.what); } But I am worried that the C++ parser might leak objects if I throw an exception all the way out of the parse() method. Can any bison developer tell me whether any objects are leaked if I throw an exception out of the parse() method and then delete the parser? Thanks. -- john _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison