From 6a3b09c2b4bb5ce5f6a226d694cb0400d117500e Mon Sep 17 00:00:00 2001 From: sebastien Date: Mon, 3 Nov 2008 16:35:40 +0000 Subject: [PATCH] trunk preprocessor: fixed bug when both "simul" and "periods" options are given to stoch_simul git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2232 ac1d8469-bf42-47a9-8791-bf33cf982152 --- preprocessor/ParsingDriver.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/preprocessor/ParsingDriver.cc b/preprocessor/ParsingDriver.cc index dcd1b6d34..c0f2dc538 100644 --- a/preprocessor/ParsingDriver.cc +++ b/preprocessor/ParsingDriver.cc @@ -617,8 +617,9 @@ ParsingDriver::option_num(const string &name_option, string *opt) void ParsingDriver::option_num(const string &name_option, const string &opt) { - if (options_list.num_options.find(name_option) - != options_list.num_options.end()) + // Since "periods" option automatically sets "simul" option, we don't want to fail if user explicitly sets both "simul" and "periods" + if (name_option != "simul" + && (options_list.num_options.find(name_option) != options_list.num_options.end())) error("option " + name_option + " declared twice"); if ((name_option == "periods") && (mod_file->model_tree.mode == eSparseDLLMode || mod_file->model_tree.mode == eSparseMode))