diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc
index 81d4ec165c9d470058ab3aa70deb100976639e8f..6d321dcd0a5259098a126ba766b6d0d034892668 100644
--- a/preprocessor/ComputingTasks.cc
+++ b/preprocessor/ComputingTasks.cc
@@ -1669,7 +1669,7 @@ BasicPriorStatement::BasicPriorStatement(const string &name_arg,
 void
 BasicPriorStatement::checkPass(ModFileStructure &mod_file_struct)
 {
-  if (options_list.string_options.find("shape") == options_list.string_options.end())
+  if (prior_shape == eNoShape)
     {
       cerr << "ERROR: You must pass the shape option to the prior statement." << endl;
       exit(EXIT_FAILURE);
@@ -1732,7 +1732,7 @@ void
 BasicPriorStatement::writeShape(ostream &output, const string &lhs_field) const
 {
   assert(prior_shape != eNoShape);
-  output << "estimation_info" << lhs_field << "(prior_indx).shape = " << prior_shape;
+  output << "estimation_info" << lhs_field << "(prior_indx).shape = " << prior_shape << ";" << endl;
 }
 
 PriorStatement::PriorStatement(const string &name_arg,
diff --git a/preprocessor/DynareBison.yy b/preprocessor/DynareBison.yy
index 86dfb2c4088b418088e507398539bd79f97e42a6..e688ff2e0b9a779769cf177683e08a851d5b5ef1 100644
--- a/preprocessor/DynareBison.yy
+++ b/preprocessor/DynareBison.yy
@@ -183,7 +183,7 @@ class ParsingDriver;
 %type <symbol_type_val> change_type_arg
 %type <vector_string_val> change_type_var_list
 %type <vector_int_val> vec_int_elem vec_int_1 vec_int vec_int_number
-%type <prior_distributions_val> prior_pdf
+%type <prior_distributions_val> prior_pdf prior_distribution
 %%
 
 %start statement_list;
@@ -1159,6 +1159,22 @@ estimated_bounds_elem : STDERR symbol COMMA expression COMMA expression ';'
                         }
                       ;
 
+prior_distribution : BETA
+                     { $$ = eBeta; }
+                   | GAMMA
+                     { $$ = eGamma; }
+                   | NORMAL
+                     { $$ = eNormal; }
+                   | INV_GAMMA
+                     { $$ = eInvGamma; }
+                   | INV_GAMMA1
+                     { $$ = eInvGamma1; }
+                   | UNIFORM
+                     { $$ = eUniform; }
+                   | INV_GAMMA2
+                     { $$ = eInvGamma2; }
+                   ;
+
 prior_pdf : BETA_PDF
             { $$ = eBeta; }
           | GAMMA_PDF
@@ -1975,7 +1991,7 @@ o_last_obs : LAST_OBS EQUAL date_number
              { driver.option_date("last_obs", $3); }
            ;
 o_shift : SHIFT EQUAL signed_number { driver.option_num("shift", $3); };
-o_shape : SHAPE EQUAL prior_pdf { driver.prior_shape = $3; };
+o_shape : SHAPE EQUAL prior_distribution { driver.prior_shape = $3; };
 o_mode : MODE EQUAL signed_number { driver.option_num("mode", $3); };
 o_mean : MEAN EQUAL signed_number { driver.option_num("mean", $3); };
 o_stdev : STDEV EQUAL non_negative_number { driver.option_num("stdev", $3); };