Commit 17477ab0 authored by MichelJuillard's avatar MichelJuillard

adding ramsey_model to Dynare grammar

parent f58a72c5
......@@ -119,7 +119,7 @@ class ParsingDriver;
%token SHOCKS SHOCK_DECOMPOSITION SIGMA_E SIMUL SIMUL_ALGO SIMUL_SEED ENDOGENOUS_TERMINAL_PERIOD
%token SMOOTHER SQUARE_ROOT_SOLVER STACK_SOLVE_ALGO STEADY_STATE_MODEL SOLVE_ALGO SOLVER_PERIODS
%token STDERR STEADY STOCH_SIMUL SURPRISE SYLVESTER SYLVESTER_FIXED_POINT_TOL REGIMES REGIME
%token TEX RAMSEY_POLICY PLANNER_DISCOUNT DISCRETIONARY_POLICY DISCRETIONARY_TOL
%token TEX RAMSEY_MODEL RAMSEY_POLICY PLANNER_DISCOUNT DISCRETIONARY_POLICY DISCRETIONARY_TOL
%token <string_val> TEX_NAME
%token UNIFORM_PDF UNIT_ROOT_VARS USE_DLL USEAUTOCORR GSA_SAMPLE_FILE USE_UNIVARIATE_FILTERS_IF_SINGULARITY_IS_DETECTED
%token VALUES VAR VAREXO VAREXO_DET VAROBS PREDETERMINED_VARIABLES
......@@ -232,6 +232,7 @@ statement : parameters
| model_comparison
| model_info
| planner_objective
| ramsey_model
| ramsey_policy
| discretionary_policy
| bvar_density
......@@ -1778,6 +1779,16 @@ mc_filename_list : filename
planner_objective : PLANNER_OBJECTIVE { driver.begin_planner_objective(); }
hand_side { driver.end_planner_objective($3); } ';';
ramsey_model : RAMSEY_MODEL ';'
{ driver.ramsey_model(); }
| RAMSEY_MODEL '(' ramsey_model_options_list ')' ';'
{ driver.ramsey_model(); }
| RAMSEY_MODEL symbol_list ';'
{ driver.ramsey_model(); }
| RAMSEY_MODEL '(' ramsey_model_options_list ')' symbol_list ';'
{ driver.ramsey_model(); }
;
ramsey_policy : RAMSEY_POLICY ';'
{ driver.ramsey_policy(); }
| RAMSEY_POLICY '(' ramsey_policy_options_list ')' ';'
......@@ -1807,6 +1818,14 @@ discretionary_policy_options : ramsey_policy_options
| o_dp_maxit;
;
ramsey_model_options_list : ramsey_model_options_list COMMA ramsey_model_options
| ramsey_model_options
;
ramsey_model_options : o_planner_discount
| o_instruments
;
ramsey_policy_options_list : ramsey_policy_options_list COMMA ramsey_policy_options
| ramsey_policy_options
;
......
......@@ -137,6 +137,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>dsample {BEGIN DYNARE_STATEMENT; return token::DSAMPLE;}
<INITIAL>Sigma_e {BEGIN DYNARE_STATEMENT; sigma_e = 1; return token::SIGMA_E;}
<INITIAL>planner_objective {BEGIN DYNARE_STATEMENT; return token::PLANNER_OBJECTIVE;}
<INITIAL>ramsey_model {BEGIN DYNARE_STATEMENT; return token::RAMSEY_MODEL;}
<INITIAL>ramsey_policy {BEGIN DYNARE_STATEMENT; return token::RAMSEY_POLICY;}
<INITIAL>discretionary_policy {BEGIN DYNARE_STATEMENT; return token::DISCRETIONARY_POLICY;}
<INITIAL>identification {BEGIN DYNARE_STATEMENT; return token::IDENTIFICATION;}
......
Markdown is supported
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