help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bison and C++ exceptions


From: Akim Demaille
Subject: Re: bison and C++ exceptions
Date: Mon, 13 Jun 2011 17:19:23 +0200

Le 24 mai 2011 à 20:32, Sergey Klimkin a écrit :

> Hi!

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!?

This was not considered when writing the C++ parser skeleton :(  Parsing is 
expected to be interrupted with YYERROR or YYABORT/YYACCEPT.  So if there are 
not too many actions that need to be wrapped, then maybe you can catch the 
exception, save it, YYABORT, and rethrow from the parser-caller?

Your request is legitimate, this is something we should address.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]