From 4a28394ab3e81ceb6bd9a51d3a48f362f6d85b8a Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 5 Dec 2008 11:19:30 +0000 Subject: [PATCH] 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 --- DynareBison.yy | 11 +++++++++-- DynareFlex.ll | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/DynareBison.yy b/DynareBison.yy index ccdcaf96..03dbcc34 100644 --- a/DynareBison.yy +++ b/DynareBison.yy @@ -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 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(); }; diff --git a/DynareFlex.ll b/DynareFlex.ll index 961326a8..7def0fef 100644 --- a/DynareFlex.ll +++ b/DynareFlex.ll @@ -254,6 +254,7 @@ int sigma_e = 0; /* Inside Dynare statement */ solve_algo {return token::SOLVE_ALGO;} +dr_algo {return token::DR_ALGO;} simul_algo {return token::SIMUL_ALGO;} drop {return token::DROP;} order {return token::ORDER;}