diff --git a/ComputingTasks.cc b/ComputingTasks.cc index 1d0ed9ac299256482806f8e9b83360c8dd149d11..52b8ffa04450be277a6db792dcc689e90b8bbeeb 100644 --- a/ComputingTasks.cc +++ b/ComputingTasks.cc @@ -167,17 +167,13 @@ PriorPosteriorFunctionStatement::checkPass(ModFileStructure &mod_file_struct, Wa void PriorPosteriorFunctionStatement::writeOutput(ostream &output, const string &basename, bool minimal_workspace) const { - OptionsList::num_options_t::const_iterator it = - options_list.num_options.find("prior_posterior_sampling_draws"); - if (it != options_list.num_options.end()) - cout << it->first << " = " << it->second << ";" << endl; - + options_list.writeOutput(output); string type = "posterior"; if (options_list.num_options.find("prior") != options_list.num_options.end()) type = "prior"; output << "oo_ = execute_prior_posterior_function(" - << "'" << options_list.string_options.find("function")->second << "'," + << "'" << options_list.string_options.find("function")->second << "', " << "M_, options_, oo_, estim_params_, bayestopt_, dataset_, dataset_info, " << "'" << type << "');" << endl; } diff --git a/DynareBison.yy b/DynareBison.yy index 45f2c92065dbb916ca335d8d5cda6fafea222506..fee3fdb3895b6b71cda74b6d66d4a58255ed291f 100644 --- a/DynareBison.yy +++ b/DynareBison.yy @@ -162,7 +162,7 @@ class ParsingDriver; %token SELECTED_VARIABLES_ONLY COVA_COMPUTE SIMULATION_FILE_TAG FILE_TAG %token NO_ERROR_BANDS ERROR_BAND_PERCENTILES SHOCKS_PER_PARAMETER NO_CREATE_INIT %token SHOCK_DRAWS FREE_PARAMETERS MEDIAN DATA_OBS_NBR NEIGHBORHOOD_WIDTH PVALUE_KS PVALUE_CORR -%token FILTERED_PROBABILITIES REAL_TIME_SMOOTHED PRIOR_POSTERIOR_FUNCTION PRIOR_POSTERIOR_SAMPLING_DRAWS +%token FILTERED_PROBABILITIES REAL_TIME_SMOOTHED PRIOR_POSTERIOR_FUNCTION SAMPLING_DRAWS %token PROPOSAL_TYPE PROPOSAL_UPPER_BOUND PROPOSAL_LOWER_BOUND PROPOSAL_DRAWS USE_MEAN_CENTER %token ADAPTIVE_MH_DRAWS THINNING_FACTOR COEFFICIENTS_PRIOR_HYPERPARAMETERS %token CONVERGENCE_STARTING_VALUE CONVERGENCE_ENDING_VALUE CONVERGENCE_INCREMENT_VALUE @@ -1034,7 +1034,7 @@ prior_posterior_function_options_list : prior_posterior_function_options_list CO prior_posterior_function_options : o_function | o_prior | o_posterior - | o_prior_posterior_sampling_draws + | o_sampling_draws ; simul : SIMUL ';' @@ -3084,7 +3084,7 @@ o_occbin : OCCBIN {driver.option_num("occbin", "1"); }; o_function : FUNCTION EQUAL filename { driver.option_str("function", $3); }; o_prior : PRIOR { driver.option_num("prior", "1"); }; o_posterior : POSTERIOR { driver.option_num("posterior", "1"); }; -o_prior_posterior_sampling_draws : PRIOR_POSTERIOR_SAMPLING_DRAWS EQUAL INT_NUMBER { driver.option_num("prior_posterior_sampling_draws",$3); }; +o_sampling_draws : SAMPLING_DRAWS EQUAL INT_NUMBER { driver.option_num("sampling_draws",$3); }; range : symbol ':' symbol { diff --git a/DynareFlex.ll b/DynareFlex.ll index 72aeb64ecac2b92eef8ad71ea89ab1578639fd89..d64e2fe8720a1aae0d5ee469499f82dabd797897 100644 --- a/DynareFlex.ll +++ b/DynareFlex.ll @@ -221,7 +221,7 @@ DATE -?[0-9]+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4][0-9]|5[0-2 <INITIAL>std {BEGIN DYNARE_STATEMENT; return token::STD;} <INITIAL>corr {BEGIN DYNARE_STATEMENT; return token::CORR;} <DYNARE_STATEMENT>function {return token::FUNCTION;} -<DYNARE_STATEMENT>prior_posterior_sampling_draws {return token::PRIOR_POSTERIOR_SAMPLING_DRAWS;} +<DYNARE_STATEMENT>sampling_draws {return token::SAMPLING_DRAWS;} <INITIAL>prior_posterior_function {BEGIN DYNARE_STATEMENT; return token::PRIOR_POSTERIOR_FUNCTION;} /* Inside of a Dynare statement */