/* Copy the first part of user declarations. */
#line 56 "parser.y" /* yacc.c:339 */
-#include "gromacs/utility/scoped_cptr.h"
+#include "gromacs/utility/unique_cptr.h"
#include "parser_internal.h"
-using gmx::scoped_guard_sfree;
+using gmx::sfree_guard;
using gmx::SelectionParserValue;
using gmx::SelectionParserValueList;
using gmx::SelectionParserValueListPointer;
#line 255 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree nameGuard((yyvsp[0].str));
+ const sfree_guard nameGuard((yyvsp[0].str));
SelectionTreeElementPointer s
= _gmx_sel_init_group_by_name((yyvsp[0].str), scanner);
SelectionTreeElementPointer p
#line 273 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree nameGuard((yyvsp[-1].str));
+ const sfree_guard nameGuard((yyvsp[-1].str));
set((yyval.sel), _gmx_sel_init_selection((yyvsp[-1].str), get((yyvsp[0].sel)), scanner));
END_ACTION;
}
#line 280 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree nameGuard((yyvsp[-2].str));
+ const sfree_guard nameGuard((yyvsp[-2].str));
set((yyval.sel), _gmx_sel_assign_variable((yyvsp[-2].str), get((yyvsp[0].sel)), scanner));
END_ACTION;
}
#line 287 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree nameGuard((yyvsp[-2].str));
+ const sfree_guard nameGuard((yyvsp[-2].str));
set((yyval.sel), _gmx_sel_assign_variable((yyvsp[-2].str), get((yyvsp[0].sel)), scanner));
END_ACTION;
}
#line 294 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree nameGuard((yyvsp[-2].str));
+ const sfree_guard nameGuard((yyvsp[-2].str));
set((yyval.sel), _gmx_sel_assign_variable((yyvsp[-2].str), get((yyvsp[0].sel)), scanner));
END_ACTION;
}
#line 386 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree opGuard((yyvsp[-1].str));
+ const sfree_guard opGuard((yyvsp[-1].str));
set((yyval.sel), _gmx_sel_init_comparison(get((yyvsp[-2].sel)), get((yyvsp[0].sel)), (yyvsp[-1].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 397 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree nameGuard((yyvsp[0].str));
+ const sfree_guard nameGuard((yyvsp[0].str));
set((yyval.sel), _gmx_sel_init_group_by_name((yyvsp[0].str), scanner));
END_ACTION;
}
#line 425 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree posmodGuard((yyvsp[-1].str));
+ const sfree_guard posmodGuard((yyvsp[-1].str));
set((yyval.sel), _gmx_sel_init_keyword((yyvsp[0].meth), SelectionParserValueListPointer(), (yyvsp[-1].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 433 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree posmodGuard((yyvsp[-2].str));
+ const sfree_guard posmodGuard((yyvsp[-2].str));
set((yyval.sel), _gmx_sel_init_keyword_strmatch((yyvsp[-1].meth), gmx::eStringMatchType_Auto, get((yyvsp[0].vlist)), (yyvsp[-2].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 441 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree posmodGuard((yyvsp[-3].str));
+ const sfree_guard posmodGuard((yyvsp[-3].str));
set((yyval.sel), _gmx_sel_init_keyword_strmatch((yyvsp[-2].meth), (yyvsp[-1].smt), get((yyvsp[0].vlist)), (yyvsp[-3].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 449 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree posmodGuard((yyvsp[-2].str));
+ const sfree_guard posmodGuard((yyvsp[-2].str));
set((yyval.sel), _gmx_sel_init_keyword((yyvsp[-1].meth), get((yyvsp[0].vlist)), (yyvsp[-2].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 460 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree posmodGuard((yyvsp[-2].str));
+ const sfree_guard posmodGuard((yyvsp[-2].str));
set((yyval.sel), _gmx_sel_init_method((yyvsp[-1].meth), get((yyvsp[0].plist)), (yyvsp[-2].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 500 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree posmodGuard((yyvsp[-1].str));
+ const sfree_guard posmodGuard((yyvsp[-1].str));
set((yyval.sel), _gmx_sel_init_keyword((yyvsp[0].meth), SelectionParserValueListPointer(), (yyvsp[-1].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 508 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree posmodGuard((yyvsp[-3].str));
+ const sfree_guard posmodGuard((yyvsp[-3].str));
set((yyval.sel), _gmx_sel_init_keyword_of((yyvsp[-2].meth), get((yyvsp[0].sel)), (yyvsp[-3].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 516 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree posmodGuard((yyvsp[-2].str));
+ const sfree_guard posmodGuard((yyvsp[-2].str));
set((yyval.sel), _gmx_sel_init_method((yyvsp[-1].meth), get((yyvsp[0].plist)), (yyvsp[-2].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 581 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree posmodGuard((yyvsp[-1].str));
+ const sfree_guard posmodGuard((yyvsp[-1].str));
set((yyval.sel), _gmx_sel_init_keyword((yyvsp[0].meth), SelectionParserValueListPointer(), (yyvsp[-1].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 619 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree keywordGuard((yyvsp[-2].str));
+ const sfree_guard keywordGuard((yyvsp[-2].str));
set((yyval.sel), _gmx_sel_init_position(get((yyvsp[0].sel)), (yyvsp[-2].str), scanner));
CHECK_SEL((yyval.sel));
END_ACTION;
#line 686 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree nameGuard((yyvsp[-1].str));
+ const sfree_guard nameGuard((yyvsp[-1].str));
set((yyval.param), SelectionParserParameter::create((yyvsp[-1].str), get((yyvsp[0].vlist)), (yyloc)));
END_ACTION;
}
#line 794 "parser.y" /* yacc.c:1646 */
{
BEGIN_ACTION;
- scoped_guard_sfree stringGuard((yyvsp[0].str));
+ const sfree_guard stringGuard((yyvsp[0].str));
set((yyval.val), SelectionParserValue::createString((yyvsp[0].str), (yyloc)));
END_ACTION;
}