#include "gmxpre.h"
}
%{
-#include "gromacs/utility/scoped_ptr_sfree.h"
+#include "gromacs/utility/scoped_cptr.h"
#include "parser_internal.h"
-using gmx::scoped_ptr_sfree;
+using gmx::scoped_guard_sfree;
using gmx::SelectionParserValue;
using gmx::SelectionParserValueList;
using gmx::SelectionParserValueListPointer;
| string
{
BEGIN_ACTION;
- scoped_ptr_sfree nameGuard($1);
+ scoped_guard_sfree nameGuard($1);
SelectionTreeElementPointer s
= _gmx_sel_init_group_by_name($1, scanner);
SelectionTreeElementPointer p
| string selection
{
BEGIN_ACTION;
- scoped_ptr_sfree nameGuard($1);
+ scoped_guard_sfree nameGuard($1);
set($$, _gmx_sel_init_selection($1, get($2), scanner));
END_ACTION;
}
| IDENTIFIER '=' sel_expr
{
BEGIN_ACTION;
- scoped_ptr_sfree nameGuard($1);
+ scoped_guard_sfree nameGuard($1);
set($$, _gmx_sel_assign_variable($1, get($3), scanner));
END_ACTION;
}
| IDENTIFIER '=' num_expr
{
BEGIN_ACTION;
- scoped_ptr_sfree nameGuard($1);
+ scoped_guard_sfree nameGuard($1);
set($$, _gmx_sel_assign_variable($1, get($3), scanner));
END_ACTION;
}
| IDENTIFIER '=' pos_expr
{
BEGIN_ACTION;
- scoped_ptr_sfree nameGuard($1);
+ scoped_guard_sfree nameGuard($1);
set($$, _gmx_sel_assign_variable($1, get($3), scanner));
END_ACTION;
}
sel_expr: num_expr CMP_OP num_expr
{
BEGIN_ACTION;
- scoped_ptr_sfree opGuard($2);
+ scoped_guard_sfree opGuard($2);
set($$, _gmx_sel_init_comparison(get($1), get($3), $2, scanner));
CHECK_SEL($$);
END_ACTION;
sel_expr: GROUP string
{
BEGIN_ACTION;
- scoped_ptr_sfree nameGuard($2);
+ scoped_guard_sfree nameGuard($2);
set($$, _gmx_sel_init_group_by_name($2, scanner));
END_ACTION;
}
sel_expr: pos_mod KEYWORD_GROUP
{
BEGIN_ACTION;
- scoped_ptr_sfree posmodGuard($1);
+ scoped_guard_sfree posmodGuard($1);
set($$, _gmx_sel_init_keyword($2, SelectionParserValueListPointer(), $1, scanner));
CHECK_SEL($$);
END_ACTION;
| pos_mod KEYWORD_STR basic_value_list
{
BEGIN_ACTION;
- scoped_ptr_sfree posmodGuard($1);
+ scoped_guard_sfree posmodGuard($1);
set($$, _gmx_sel_init_keyword_strmatch($2, gmx::eStringMatchType_Auto, get($3), $1, scanner));
CHECK_SEL($$);
END_ACTION;
| pos_mod KEYWORD_STR str_match_type basic_value_list
{
BEGIN_ACTION;
- scoped_ptr_sfree posmodGuard($1);
+ scoped_guard_sfree posmodGuard($1);
set($$, _gmx_sel_init_keyword_strmatch($2, $3, get($4), $1, scanner));
CHECK_SEL($$);
END_ACTION;
| pos_mod KEYWORD_NUMERIC basic_value_list
{
BEGIN_ACTION;
- scoped_ptr_sfree posmodGuard($1);
+ scoped_guard_sfree posmodGuard($1);
set($$, _gmx_sel_init_keyword($2, get($3), $1, scanner));
CHECK_SEL($$);
END_ACTION;
sel_expr: pos_mod METHOD_GROUP method_params
{
BEGIN_ACTION;
- scoped_ptr_sfree posmodGuard($1);
+ scoped_guard_sfree posmodGuard($1);
set($$, _gmx_sel_init_method($2, get($3), $1, scanner));
CHECK_SEL($$);
END_ACTION;
num_expr: pos_mod KEYWORD_NUMERIC %prec NUM_REDUCT
{
BEGIN_ACTION;
- scoped_ptr_sfree posmodGuard($1);
+ scoped_guard_sfree posmodGuard($1);
set($$, _gmx_sel_init_keyword($2, SelectionParserValueListPointer(), $1, scanner));
CHECK_SEL($$);
END_ACTION;
| pos_mod METHOD_NUMERIC method_params
{
BEGIN_ACTION;
- scoped_ptr_sfree posmodGuard($1);
+ scoped_guard_sfree posmodGuard($1);
set($$, _gmx_sel_init_method($2, get($3), $1, scanner));
CHECK_SEL($$);
END_ACTION;
| pos_mod KEYWORD_STR
{
BEGIN_ACTION;
- scoped_ptr_sfree posmodGuard($1);
+ scoped_guard_sfree posmodGuard($1);
set($$, _gmx_sel_init_keyword($2, SelectionParserValueListPointer(), $1, scanner));
CHECK_SEL($$);
END_ACTION;
pos_expr: KEYWORD_POS OF sel_expr %prec PARAM_REDUCT
{
BEGIN_ACTION;
- scoped_ptr_sfree keywordGuard($1);
+ scoped_guard_sfree keywordGuard($1);
set($$, _gmx_sel_init_position(get($3), $1, scanner));
CHECK_SEL($$);
END_ACTION;
PARAM value_list
{
BEGIN_ACTION;
- scoped_ptr_sfree nameGuard($1);
+ scoped_guard_sfree nameGuard($1);
set($$, SelectionParserParameter::create($1, get($2)));
END_ACTION;
}
| string %prec PARAM_REDUCT
{
BEGIN_ACTION;
- scoped_ptr_sfree stringGuard($1);
+ scoped_guard_sfree stringGuard($1);
set($$, SelectionParserValue::createString($1));
END_ACTION;
}