[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About %destructor is c++ mode
From: |
Min Wang |
Subject: |
Re: About %destructor is c++ mode |
Date: |
Thu, 18 Aug 2016 11:25:31 -0400 |
HI
>
>
> > My confusion is: it seems the %destructor is called even for the normal
> parse!!
>
> It should not. But I rely on C++ cleanup, so somebody else will have to
> tune in here.
>
>
>
I checked the generated code again:
#line 1038 "filter_parser.cpp" // lalr1.cc:859
YY_REDUCE_PRINT (yyn);
try
{
switch (yyn)
{
....
default:
break;
}
}
catch (const syntax_error& yyexc)
{
error (yyexc);
YYERROR;
}
YY_SYMBOL_PRINT ("-> $$ =", yylhs);
yypop_ (yylen);
yylen = 0;
YY_STACK_PRINT ();
the normal case will go to:
yypop_ (yylen) which will call basic_symbol<Base>::clear () -> call
%destructor code
It seems a defect to me. should I forward to bug-bison?
min
- Re: About %destructor is c++ mode, (continued)
- Re: About %destructor is c++ mode, Min Wang, 2016/08/18
- Re: About %destructor is c++ mode, Hans Åberg, 2016/08/19
- Re: About %destructor is c++ mode, Min Wang, 2016/08/19
- Re: About %destructor is c++ mode, Hans Åberg, 2016/08/19
- Re: About %destructor is c++ mode, Min Wang, 2016/08/19
- Re: About %destructor is c++ mode, Hans Åberg, 2016/08/19
- Re: About %destructor is c++ mode, Hans Åberg, 2016/08/19
- Re: About %destructor is c++ mode, Min Wang, 2016/08/19
- Re: About %destructor is c++ mode, Hans Åberg, 2016/08/19
- Re: About %destructor is c++ mode, Min Wang, 2016/08/19
- Re: About %destructor is c++ mode,
Min Wang <=
- Re: About %destructor is c++ mode, Min Wang, 2016/08/18
- Re: About %destructor is c++ mode, Hans Åberg, 2016/08/18