help-bison
[Top][All Lists]
Advanced

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

Re: bison and C++ exceptions


From: Hans Aberg
Subject: Re: bison and C++ exceptions
Date: Thu, 26 May 2011 09:52:57 +0200

On 26 May 2011, at 07:35, Sergey Klimkin wrote:

> I guess it might be helpful, I can not claim yet : )
> there is %initial-action declaration and the %final-action may help,
> but rhs symbols will not be discarded.
> 
> %initial-action
> {
> try {
> }
> 
> %final-action
> {
>    }
>    catch (std::exception &)
>    {
>       yyerror(...);
>       YYABORT;
>    }
> }

This may not work, because I think it may check the braces of the code part. So 
some tweaking might be required. You might get back to the bug-bison list to 
get it integrated into the skeleton file, if some of the Bison developers are 
interested. I think this try-catch issue has been overlooked.

> and I have no idea how to work with M4: (

Just compare the skeleton file with the output, to see what macros are 
translated. There is a M4 manual, too.

Hans





reply via email to

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