Commit 84ce3210 authored by sebastien's avatar sebastien
Browse files

trunk: added a warning if dr_algo=0 is specified, and an error if dr_algo=1 is specified

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2290 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 3d98d4f8
......@@ -85,7 +85,7 @@ class ParsingDriver;
%token BVAR_PRIOR_MU BVAR_PRIOR_OMEGA BVAR_PRIOR_TAU BVAR_PRIOR_TRAIN
%token BVAR_REPLIC
%token CALIB CALIB_VAR CHECK CONF_SIG CONSTANT CORR COVAR CUTOFF
%token DATAFILE DROP DSAMPLE DYNASAVE DYNATYPE
%token DATAFILE DR_ALGO DROP DSAMPLE DYNASAVE DYNATYPE
%token END ENDVAL EQUAL ESTIMATION ESTIMATED_PARAMS ESTIMATED_PARAMS_BOUNDS ESTIMATED_PARAMS_INIT
%token FILENAME FILTER_STEP_AHEAD FILTERED_VARS FIRST_OBS
%token <string_val> FLOAT_NUMBER
......@@ -637,7 +637,8 @@ stoch_simul_options_list : stoch_simul_options_list COMMA stoch_simul_options
| stoch_simul_options
;
stoch_simul_options : o_solve_algo
stoch_simul_options : o_dr_algo
| o_solve_algo
| o_simul_algo
| o_linear
| o_order
......@@ -1266,6 +1267,12 @@ number : INT_NUMBER
| FLOAT_NUMBER
;
o_dr_algo : DR_ALGO EQUAL INT_NUMBER {
if (*$3 == string("0"))
driver.warning("dr_algo option is now deprecated, and may be removed in a future version of Dynare");
else
driver.error("dr_algo=1 option is no longer supported");
}
o_solve_algo : SOLVE_ALGO EQUAL INT_NUMBER { driver.option_num("solve_algo", $3); };
o_simul_algo : SIMUL_ALGO EQUAL INT_NUMBER { driver.option_num("simul_algo", $3); };
o_linear : LINEAR { driver.linear(); };
......
......@@ -254,6 +254,7 @@ int sigma_e = 0;
/* Inside Dynare statement */
<DYNARE_STATEMENT>solve_algo {return token::SOLVE_ALGO;}
<DYNARE_STATEMENT>dr_algo {return token::DR_ALGO;}
<DYNARE_STATEMENT>simul_algo {return token::SIMUL_ALGO;}
<DYNARE_STATEMENT>drop {return token::DROP;}
<DYNARE_STATEMENT>order {return token::ORDER;}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment