Commit 643551ce authored by michel's avatar michel
Browse files

preprocessor: symbol names that are also option names (alpha, beta, ...) are now case consistent


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2991 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 18a51460
......@@ -144,9 +144,12 @@ class ParsingDriver;
%token FREQ INITIAL_YEAR INITIAL_SUBPERIOD FINAL_YEAR FINAL_SUBPERIOD DATA VLIST VARLIST LOG_VAR PERCENT_VAR
%token VLISTLOG VLISTPER
%token RESTRICTION_FNAME NLAGS CROSS_RESTRICTIONS CONTEMP_REDUCED_FORM REAL_PSEUDO_FORECAST BAYESIAN_PRIOR
%token DUMMY_OBS NSTATES INDXSCALESSTATES ALPHA BETA GSIG2_LMD GSIG2_LMDM Q_DIAG FLAT_PRIOR NCSK NSTD NINV
%token INDXPARR INDXOVR ABAND INDXAP APBAND INDXIMF IMFBAND INDXFORE FOREBAND INDXGFOREHAT INDXGIMFHAT
%token INDXESTIMA INDXGDLS EQ_MS CMS NCMS EQ_CMS TLINDX TLNUMBER CNUM BANACT CREATE_INITIALIZATION_FILE ESTIMATE_MSMODEL
%token DUMMY_OBS NSTATES INDXSCALESSTATES
%token <string_val> ALPHA BETA ABAND NINV CMS NCMS CNUM
%token GSIG2_LMD GSIG2_LMDM Q_DIAG FLAT_PRIOR NCSK NSTD
%token INDXPARR INDXOVR INDXAP APBAND INDXIMF IMFBAND INDXFORE FOREBAND INDXGFOREHAT INDXGIMFHAT
%token INDXESTIMA INDXGDLS EQ_MS
%token EQ_CMS TLINDX TLNUMBER BANACT CREATE_INITIALIZATION_FILE ESTIMATE_MSMODEL
%token COMPUTE_MDD COMPUTE_PROBABILITIES PRINT_DRAWS N_DRAWS THINNING_FACTOR PROPOSAL_DRAWS MARKOV_FILE
%token MHM_FILE OUTPUT_FILE_TAG DRAWS_NBR_BURN_IN_1 DRAWS_NBR_BURN_IN_2 DRAWS_NBR_MEAN_VAR_ESTIMATE
%token DRAWS_NBR_MODIFIED_HARMONIC_MEAN DIRICHLET_SCALE
......@@ -1730,13 +1733,13 @@ vec_value_1 : '[' value1
vec_value : vec_value_1 ']' { $1->append("]"); $$ = $1; };
symbol : NAME
| ALPHA {$$ = new string("alpha");}
| BETA {$$ = new string("beta");}
| NINV {$$ = new string("ninv");}
| ABAND {$$ = new string("aband");}
| CMS {$$ = new string("cms");}
| NCMS {$$ = new string("ncms");}
| CNUM {$$ = new string("cnum");}
| ALPHA
| BETA
| NINV
| ABAND
| CMS
| NCMS
| CNUM
;
%%
......
......@@ -236,18 +236,30 @@ int sigma_e = 0;
<DYNARE_STATEMENT>dummy_obs {return token::DUMMY_OBS;}
<DYNARE_STATEMENT>nstates {return token::NSTATES;}
<DYNARE_STATEMENT>indxscalesstates {return token::INDXSCALESSTATES;}
<DYNARE_STATEMENT>alpha {return token::ALPHA;}
<DYNARE_STATEMENT>beta {return token::BETA;}
<DYNARE_STATEMENT>alpha {
yylval->string_val = new string(yytext);
return token::ALPHA;
}
<DYNARE_STATEMENT>beta {
yylval->string_val = new string(yytext);
return token::BETA;
}
<DYNARE_STATEMENT>gsig2_lmd {return token::GSIG2_LMD;}
<DYNARE_STATEMENT>gsig2_lmdm {return token::GSIG2_LMDM;}
<DYNARE_STATEMENT>q_diag {return token::Q_DIAG;}
<DYNARE_STATEMENT>flat_prior {return token::FLAT_PRIOR;}
<DYNARE_STATEMENT>ncsk {return token::NCSK;}
<DYNARE_STATEMENT>nstd {return token::NSTD;}
<DYNARE_STATEMENT>ninv {return token::NINV;}
<DYNARE_STATEMENT>ninv {
yylval->string_val = new string(yytext);
return token::NINV;
}
<DYNARE_STATEMENT>indxparr {return token::INDXPARR;}
<DYNARE_STATEMENT>indxovr {return token::INDXOVR;}
<DYNARE_STATEMENT>aband {return token::ABAND;}
<DYNARE_STATEMENT>aband {
yylval->string_val = new string(yytext);
return token::ABAND;
}
<DYNARE_STATEMENT>indxap {return token::INDXAP;}
<DYNARE_STATEMENT>apband {return token::APBAND;}
<DYNARE_STATEMENT>indximf {return token::INDXIMF;}
......@@ -259,12 +271,21 @@ int sigma_e = 0;
<DYNARE_STATEMENT>indxestima {return token::INDXESTIMA;}
<DYNARE_STATEMENT>indxgdls {return token::INDXGDLS;}
<DYNARE_STATEMENT>eq_ms {return token::EQ_MS;}
<DYNARE_STATEMENT>cms {return token::CMS;}
<DYNARE_STATEMENT>ncms {return token::NCMS;}
<DYNARE_STATEMENT>cms {
yylval->string_val = new string(yytext);
return token::CMS;
}
<DYNARE_STATEMENT>ncms {
yylval->string_val = new string(yytext);
return token::NCMS;
}
<DYNARE_STATEMENT>eq_cms {return token::EQ_CMS;}
<DYNARE_STATEMENT>tlindx {return token::TLINDX;}
<DYNARE_STATEMENT>tlnumber {return token::TLNUMBER;}
<DYNARE_STATEMENT>cnum {return token::CNUM;}
<DYNARE_STATEMENT>cnum {
yylval->string_val = new string(yytext);
return token::CNUM;
}
<DYNARE_STATEMENT>banact {return token::BANACT;}
<DYNARE_STATEMENT>output_file_tag {return token::OUTPUT_FILE_TAG;}
<DYNARE_STATEMENT>create_initialization_file {return token::CREATE_INITIALIZATION_FILE;}
......
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