lalr1.cc: fix exception safety
authorAkim Demaille <akim@lrde.epita.fr>
Thu, 20 Sep 2012 14:59:29 +0000 (16:59 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Sat, 6 Oct 2012 17:53:45 +0000 (19:53 +0200)
commit7e1fabbeae9accb48611457f550286f1934ef533
treeb214f5f7e41b11a1c35885263f8b79f01ed7cc79
parentcff926615f1ae4441f60ebeb2992a2d221da910f
lalr1.cc: fix exception safety

lalr1.cc does not reclaim its memory when ended by an exception.

Reported by Oleksii Taran:
http://lists.gnu.org/archive/html/help-bison/2012-09/msg00000.html

* data/lalr1.cc (yyparse): Protect the whole yyparse by a try-catch
block that cleans the stack and the lookahead.
THANKS
data/lalr1.cc