Re: Exception safety of generated C++ parser

2012-09-28 Thread Oleksii Taran
26.09.12 10:20, Akim Demaille wrote: > Hi Oleksii, > > Le 24 sept. 2012 à 16:55, Akim Demaille a écrit : > >> The more I think about it, the more I believe that I took the wrong >> path, and exception safety should be addressed at the yyparse level: >> put the whole function into a try/catch block.

Re: Exception safety of generated C++ parser

2012-09-28 Thread Oleksii Taran
24.09.12 17:55, Akim Demaille wrote: > >> I've noticed some strange >> leaks, but they are really small, and I can't trace the reason of it. I >> will test it for some time now. Anyway, good job! > I would really like to have some more information about these leaks. > Note that if there are some ty

Re: Exception safety of generated C++ parser

2012-09-26 Thread Akim Demaille
Hi Oleksii, Le 24 sept. 2012 à 16:55, Akim Demaille a écrit : > The more I think about it, the more I believe that I took the wrong > path, and exception safety should be addressed at the yyparse level: > put the whole function into a try/catch block. That way, we are > also protected from error

Re: Exception safety of generated C++ parser

2012-09-24 Thread Akim Demaille
Le 24 sept. 2012 à 16:49, Oleksii Taran a écrit : > Sorry for late answer No worries. > I've tested maint-exception-safety branch on my project. Well, it is > quite good, major memory leaks are gone. Good news! > I've noticed some strange > leaks, but they are really small, and I can't trace

Re: Exception safety of generated C++ parser

2012-09-24 Thread Oleksii Taran
21.09.12 10:18, Akim Demaille написав(ла): > Le 20 sept. 2012 à 23:38, Oleksii Taran a écrit : > >> Git branch is preferred, but patches are also okay. > Its name is maint-exception-safety. > >> I'll make some testing of your patches in my project, with exceptions >> thrown only in rule action code

Re: Exception safety of generated C++ parser

2012-09-21 Thread Akim Demaille
Le 20 sept. 2012 à 23:38, Oleksii Taran a écrit : > Git branch is preferred, but patches are also okay. Its name is maint-exception-safety. > I'll make some testing of your patches in my project, with exceptions > thrown only in rule action code. It will take some time, because I need > to disa

Re: Exception safety of generated C++ parser

2012-09-20 Thread Oleksii Taran
20.09.12 18:12, Akim Demaille wrote: > Le 19 sept. 2012 à 20:35, Oleksii Taran a écrit : > >> 19.09.12 17:01, Akim Demaille wrote: >>> Le 13 sept. 2012 à 17:54, Oleksii Taran a écrit : >>> Hello Does Bison guarantees exception safety in C++ parser, i.e. will it make any clean-up

Re: Exception safety of generated C++ parser

2012-09-20 Thread Akim Demaille
Le 19 sept. 2012 à 20:35, Oleksii Taran a écrit : > 19.09.12 17:01, Akim Demaille wrote: >> Le 13 sept. 2012 à 17:54, Oleksii Taran a écrit : >> >>> Hello >>> >>> Does Bison guarantees exception safety in C++ parser, i.e. will it make >>> any clean-up and free memory if an exception is thrown o

Re: Exception safety of generated C++ parser

2012-09-19 Thread Luca
On 13/09/2012 22:52, Oleksii Taran wrote: 13.09.12 19:32, Hans Aberg wrote: On 13 Sep 2012, at 17:54, Oleksii Taran wrote: Does Bison guarantees exception safety in C++ parser, i.e. will it make any clean-up and free memory if an exception is thrown on rule action? Yes, the default stack is s

Re: Exception safety of generated C++ parser

2012-09-19 Thread Oleksii Taran
19.09.12 17:01, Akim Demaille wrote: > Le 13 sept. 2012 à 17:54, Oleksii Taran a écrit : > >> Hello >> >> Does Bison guarantees exception safety in C++ parser, i.e. will it make >> any clean-up and free memory if an exception is thrown on rule action? I >> know about %destructor directive, but it s

Re: Exception safety of generated C++ parser

2012-09-19 Thread Akim Demaille
Le 13 sept. 2012 à 17:54, Oleksii Taran a écrit : > Hello > > Does Bison guarantees exception safety in C++ parser, i.e. will it make > any clean-up and free memory if an exception is thrown on rule action? I > know about %destructor directive, but it seems irrelevant, since > destructor code is

Re: Exception safety of generated C++ parser

2012-09-13 Thread Hans Aberg
On 13 Sep 2012, at 22:52, Oleksii Taran wrote: > 13.09.12 19:32, Hans Aberg wrote: >> On 13 Sep 2012, at 17:54, Oleksii Taran wrote: >> >>> Does Bison guarantees exception safety in C++ parser, i.e. will it make >>> any clean-up and free memory if an exception is thrown on rule action? >> Yes, th

Re: Exception safety of generated C++ parser

2012-09-13 Thread Oleksii Taran
13.09.12 19:32, Hans Aberg wrote: > On 13 Sep 2012, at 17:54, Oleksii Taran wrote: > >> Does Bison guarantees exception safety in C++ parser, i.e. will it make >> any clean-up and free memory if an exception is thrown on rule action? > Yes, the default stack is std::deque. > >> I >> know about %des

Re: Exception safety of generated C++ parser

2012-09-13 Thread Hans Aberg
On 13 Sep 2012, at 17:54, Oleksii Taran wrote: > Does Bison guarantees exception safety in C++ parser, i.e. will it make > any clean-up and free memory if an exception is thrown on rule action? Yes, the default stack is std::deque. > I > know about %destructor directive, but it seems irrelevant,

Exception safety of generated C++ parser

2012-09-13 Thread Oleksii Taran
Hello Does Bison guarantees exception safety in C++ parser, i.e. will it make any clean-up and free memory if an exception is thrown on rule action? I know about %destructor directive, but it seems irrelevant, since destructor code is called only if parser recovers from _syntax_ error. -- Best r