Commits (1)
......@@ -2186,6 +2186,8 @@ list_sampling_option : QUOTED_STRING COMMA QUOTED_STRING
{ driver.sampling_options_string($1, $3); }
| QUOTED_STRING COMMA signed_number
{ driver.sampling_options_num($1, $3); }
| QUOTED_STRING COMMA vec_str
{ driver.sampling_options_vec_str($1, $3); }
| QUOTED_STRING COMMA '(' sub_sampling_options ')'
{ driver.sampling_options_string($1, '(' + $4 + ')'); }
;
......
......@@ -1984,6 +1984,20 @@ ParsingDriver::sampling_options_num(const string &name, const string &value)
options_list.string_options["posterior_sampler_options.sampling_opt"] += value;
}
void
ParsingDriver::sampling_options_vec_str(const string &name, vector<string> value)
{
sampling_options_helper(name);
options_list.string_options["posterior_sampler_options.sampling_opt"] += "{";
for (auto &it : value)
{
if (&it != &value.front())
options_list.string_options["posterior_sampler_options.sampling_opt"] += ",";
options_list.string_options["posterior_sampler_options.sampling_opt"] += "''" + it + "''";
}
options_list.string_options["posterior_sampler_options.sampling_opt"] += "}";
}
void
ParsingDriver::check_varobs()
{
......
......@@ -556,6 +556,8 @@ public:
void sampling_options_string(const string &name, const string &value);
//! Adds an sampling option (numeric value)
void sampling_options_num(const string &name, const string &value);
//! Adds an sampling option (vec_str value)
void sampling_options_vec_str(const string &name, vector<string> value);
//! Check that no observed variable has yet be defined
void check_varobs();
//! Add a new observed variable
......