Commit ab037755 authored by michel's avatar michel
Browse files

added all syntax of version 3.046+correction for parentheses bug

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@439 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 08c17cf2
......@@ -59,12 +59,23 @@ void ComputingTasks::setOption(string name, string value)
*output << "options_." << name << " = " << value << ";\n";
}
//------------------------------------------------------------------------------
void ComputingTasks::setOption(string name, string value1, string value2)
{
*output << "options_." << name << " = [" << value1 << "; " << value2 << "];\n";
}
//------------------------------------------------------------------------------
void ComputingTasks::runEstimation(string tmp1)
{
*output << tmp1;
*output << "dynare_estimation(var_list_);\n";
}
//------------------------------------------------------------------------------
void ComputingTasks::runRplot(string tmp1)
{
*output << tmp1;
*output << "rplot(var_list_,rplottype_);\n";
}
//------------------------------------------------------------------------------
void ComputingTasks::setEstimationInit(void)
{
*output << "global estim_params_\n";
......@@ -118,56 +129,54 @@ void ComputingTasks::setOptimOptions(string str1, string str2, int task)
//------------------------------------------------------------------------------
void ComputingTasks::setEstimatedElements(void)
{
if (!SymbolTable::Exist(EstimParams->name))
{
string msg = "Unknown symbol : "+EstimParams->name;
error(msg.c_str());
}
if (SymbolTable::isReferenced(EstimParams->name) == eNotReferenced)
{
return;
}
if ((EstimParams->init_val).size() == 0)
{
EstimParams->init_val = EstimParams->mean;
}
if (EstimParams->type == 2)
{
// Setting user parameter name
*output << "estim_params_.user_param_names = strvcat(estim_params_.user_param_names, ";
*output << "'" << EstimParams->name << "');\n";
// Setting Dynare parameter name
*output << "estim_params_.param_names = strvcat(estim_params_.param_names, ";
*output << "'M_.params(" << SymbolTable::getID(EstimParams->name)+1 << ")');\n";
}
if( SymbolTable::getType(EstimParams->name) == eExogenous)
{
*output << "estim_params_.var_exo = [estim_params_.var_exo; ";
}
else if ( SymbolTable::getType(EstimParams->name) == eEndogenous)
if (!SymbolTable::Exist(EstimParams->name))
{
string msg = "Unknown symbol : "+EstimParams->name;
error(msg.c_str());
}
if (SymbolTable::isReferenced(EstimParams->name) == eNotReferenced)
{
return;
}
if ((EstimParams->init_val).size() == 0)
{
EstimParams->init_val = EstimParams->mean;
}
switch(EstimParams->type)
{
case 1:
if( SymbolTable::getType(EstimParams->name) == eExogenous)
{
*output << "estim_params_.var_endo = [estim_params_.var_endo; ";
*output << "estim_params_.var_exo = [estim_params_.var_exo; ";
}
else if ( SymbolTable::getType(EstimParams->name) == eParameter)
else if ( SymbolTable::getType(EstimParams->name) == eEndogenous)
{
*output << "estim_params_.param_vals = [estim_params_.param_vals; ";
*output << "estim_params_.var_endo = [estim_params_.var_endo; ";
}
if (EstimParams->type == 1)
*output << SymbolTable::getID(EstimParams->name)+1;
break;
case 2:
*output << "estim_params_.param_vals = [estim_params_.param_vals; ";
*output << SymbolTable::getID(EstimParams->name)+1;
break;
case 3:
if( SymbolTable::getType(EstimParams->name) == eExogenous)
{
*output << SymbolTable::getID(EstimParams->name)+1 << " " <<
EstimParams->init_val << " " << EstimParams->low_bound << " " <<
EstimParams->up_bound << " " << EstimParams->prior << " ";
*output << EstimParams->mean << " " << EstimParams->std << " " <<
EstimParams->p3 << " " << EstimParams->p4 << " " << EstimParams->jscale << "];\n";
*output << "estim_params_.corrx = [estim_params_.corrx; ";
}
else if (EstimParams->type == 2)
else if ( SymbolTable::getType(EstimParams->name) == eEndogenous)
{
*output << EstimParams->init_val << " " << EstimParams->low_bound << " " <<
EstimParams->up_bound << " " << EstimParams->prior << " ";
*output << EstimParams->mean << " " << EstimParams->std << " " <<
EstimParams->p3 << " " << EstimParams->p4 << " " << EstimParams->jscale << "];\n";
*output << "estim_params_.corrn = [estim_params_.corrn; ";
}
EstimParams->clear();
*output << SymbolTable::getID(EstimParams->name)+1;
*output << " " << SymbolTable::getID(EstimParams->name2)+1;
break;
}
*output << " " << EstimParams->init_val << " " << EstimParams->low_bound << " " <<
EstimParams->up_bound << " " << EstimParams->prior << " ";
*output << EstimParams->mean << " " << EstimParams->std << " " <<
EstimParams->p3 << " " << EstimParams->p4 << " " << EstimParams->jscale << "];\n";
EstimParams->clear();
}
void ComputingTasks::set_trend_element (string name, string expression)
{
......@@ -178,7 +187,7 @@ void ComputingTasks::set_trend_element (string name, string expression)
(* error) (msg.c_str());
}
Type type = SymbolTable::getType(name);
int id = SymbolTable::getID(name);
// int id = SymbolTable::getID(name);
if (type == eEndogenous)
{
*output << "tmp1 = strmatch(" << name << ",options_.varobs,'exact');\n";
......@@ -191,185 +200,217 @@ void ComputingTasks::set_trend_element (string name, string expression)
}
//------------------------------------------------------------------------------
void ComputingTasks::setCalibInit(void)
void ComputingTasks::BeginCalibVar(void)
{
*output << "%\n% CALIB_VAR \n%\n";
for(int i=1;i<4;++i)
{
*output << "calib_var_index{" << i << "} = [];\n";
*output << "calib_targets{" << i << "} = [];\n";
*output << "calib_weights{" << i << "}=[];\n";
}
*output << "%\n% CALIB_VAR \n%\n";
for(int i=1;i<4;++i)
{
*output << "calib_var_index{" << i << "} = [];\n";
*output << "calib_targets{" << i << "} = [];\n";
*output << "calib_weights{" << i << "}=[];\n";
}
}
//------------------------------------------------------------------------------
void ComputingTasks::setCalibVariance(void)
void ComputingTasks::setCalibVar(string name, string weight, string expression)
{
/*
char buffer[200];
if (p_t->endo_exo == 1 || p_t->endo_exo == 3)
if (!SymbolTable::Exist(name))
{
sprintf(buffer,"calib_var_index{1} = [calib_var_index{1};%d];\n",p_t->nbr+1);
str_output(buffer);
str_output("calib_targets{1} =[calib_targets{1}; ");
p_expression(p_q);
str_output("];\n");
sprintf(buffer,"calib_weights{1} = [calib_weights{1}; %s];\n",weight);
str_output(buffer);
string msg = "calib_var: " + name + " doesn't exist";
error(msg.c_str());
}
else if (p_t->endo_exo == 0)
int id = SymbolTable::getID(name)+1;
if (SymbolTable::getType(name) == eEndogenous)
{
sprintf(buffer,"calib_var_index{3} = [calib_var_index{3};%d %d];\n",p_t->nbr+1,p_t->nbr+1);
str_output(buffer);
str_output("calib_targets{3} =[calib_targets{3}; ");
p_expression(p_q);
str_output("];\n");
sprintf(buffer,"calib_weights{3} = [calib_weights{3}; %s];\n",weight);
str_output(buffer);
*output << "calib_var_index{1} = [calib_var_index{1};" << id << "," << id << "];\n";
*output << "calib_weights{1} = [calib_weights{1}; " << weight << "];\n";
*output << "calib_targets{1} =[calib_targets{1}; " << expression << "];\n";
}
else if (SymbolTable::getType(name) == eExogenous)
{
*output << "calib_var_index{3} = [calib_var_index{3};" << id << "," << id << "];\n";
*output << "calib_weights{3} = [calib_weights{3}; " << weight << "];\n";
*output << "calib_targets{3} =[calib_targets{3}; " << expression << "];\n";
}
else
{
printf("ERROR in CALIB: one of the targets isn't legitimate\n");
}
*/
string msg = "calib_var: " + name + "isn't a endogenous or an exogenous variable";
error(msg.c_str());
}
}
//------------------------------------------------------------------------------
void ComputingTasks::setCalibCovariance(void)
void ComputingTasks::setCalibVar(string name1, string name2, string weight, string expression)
{
/*
0 : exo
1 endo
char buffer[200];
if ((p_t1->endo_exo == 0 && p_t2->endo_exo == 1)|| (p_t1->endo_exo == 1 && p_t2->endo_exo == 0))
if (!SymbolTable::Exist(name1))
{
printf("ERROR in CALIB: can't target correlation between an Endogenousous and an Exogenousous variable\n");
exit(1);
string msg = "calib_var: " + name1 + " doesn't exist";
error(msg.c_str());
}
else if (p_t1->endo_exo == 1 || p_t1->endo_exo == 3)
if (!SymbolTable::Exist(name2))
{
sprintf(buffer,"calib_var_index{2} = [calib_var_index{2};%d %d];\n",p_t1->nbr+1,p_t2->nbr+1);
str_output(buffer);
str_output("calib_targets{2} =[calib_targets{2}; ");
p_expression(p_q);
str_output("];\n");
sprintf(buffer,"calib_weights{2} = [calib_weights{2}; %s];\n",weight);
str_output(buffer);
string msg = "calib_var: " + name2 + " doesn't exist";
error(msg.c_str());
}
else if (p_t1->endo_exo == 0)
if (SymbolTable::getType(name1) != SymbolTable::getType(name2))
{
sprintf(buffer,"calib_var_index{3} = [calib_var_index{2};%d %d];\n",p_t1->nbr+1,p_t2->nbr+1);
str_output(buffer);
str_output("calib_targets{3} =[calib_targets{3}; ");
p_expression(p_q);
str_output("];\n");
sprintf(buffer,"calib_weights{3} = [calib_weights{3}; %s];\n",weight);
str_output(buffer);
string msg = "calib_var: " + name1 + " and " + name2 + " don't have the same type";
error(msg.c_str());
}
int id1 = SymbolTable::getID(name1)+1;
int id2 = SymbolTable::getID(name2)+1;
if (SymbolTable::getType(name1) == eEndogenous)
{
*output << "calib_var_index{1} = [calib_var_index{1};" << id1 << "," << id2 << "];\n";
*output << "calib_weights{1} = [calib_weights{1}; " << weight << "];\n";
*output << "calib_targets{1} =[calib_targets{1}; " << expression << "];\n";
}
else if (SymbolTable::getType(name1) == eExogenous)
{
*output << "calib_var_index{3} = [calib_var_index{3};" << id1 << "," << id2 << "];\n";
*output << "calib_weights{3} = [calib_weights{3}; " << weight << "];\n";
*output << "calib_targets{3} =[calib_targets{3}; " << expression << "];\n";
}
else
{
printf("ERROR in CALIB: one of the targets isn''t legitimate\n");
exit(1);
string msg = "calib_var: " + name1 + " and " + name2 + "aren't endogenous or exogenous variables";
error(msg.c_str());
}
*/
}
//------------------------------------------------------------------------------
void ComputingTasks::setCalibAutoCorrelation(void)
void ComputingTasks::setCalibAc(string name, string ar, string weight, string expression)
{
/*
char buffer[200];
int i, iar;
iar = atoi(ar)+3;
static int max_iar = 3;
if (!SymbolTable::Exist(name))
{
string msg = "calib_var: " + name + " doesn't exist";
error(msg.c_str());
}
int id = SymbolTable::getID(name)+1;
int iar = atoi(ar.c_str())+3;
if (iar > max_iar)
{
for(i=max_iar+1; i <= iar; ++i)
// creates new variables
for(int i=max_iar+1; i <= iar; ++i)
{
sprintf(buffer,"calib_var_index{%d} = [];\ncalib_targets{%d} = [];\ncalib_weights{%d}=[];\n",i,i,i);
str_output(buffer);
*output << "calib_var_index{" << i << "} = [];\n";
*output << "calib_targets{" << i << "} = [];\n";
*output << "calib_weights{" << i << "}=[];\n";
}
max_iar = iar;
}
sprintf(buffer,"calib_var_index{%d} = [calib_var_index{%d};%d];\n",iar,iar,p_t->nbr+1);
str_output(buffer);
sprintf(buffer,"calib_targets{%d} =[calib_targets{%d}; ",iar,iar);
str_output(buffer);
p_expression(p_q);
str_output("];\n");
sprintf(buffer,"calib_weights{%d} = [calib_weights{%d}; %s];\n",iar,iar,weight);
str_output(buffer);
*/
if (SymbolTable::getType(name) == eEndogenous)
{
*output << "calib_var_index{" << iar << "} = [calib_var_index{" << iar << "};" << id << "];\n";
*output << "calib_weights{" << iar << "} = [calib_weights{" << iar << "}; " << weight << "];\n";
*output << "calib_targets{" << iar << "} =[calib_targets{" << iar << "}; " << expression << "];\n";
}
else
{
string msg = "calib_var: " + name + "isn't a endogenous variable";
error(msg.c_str());
}
}
//------------------------------------------------------------------------------
void ComputingTasks::setCalib(void)
void ComputingTasks::runCalib(int cova)
{
/*
sprintf(buffer,"M_.Sigma_e=calib(calib_var_index,calib_targets,calib_weights,%d,%d,Sigma_e_);\n",max_iar-3,cova);
str_output(buffer);
*/
*output << "M_.Sigma_e=calib(calib_var_index,calib_targets,calib_weights," << cova << ",Sigma_e_);\n";
}
//------------------------------------------------------------------------------
void ComputingTasks::setOsr(string tmp1)
void ComputingTasks::setOsrParams(string tmp)
{
*output << tmp1;
*output << "osr(var1_list_,osr_params_,optim_weights_);\n";
*output << tmp;
}
//------------------------------------------------------------------------------
void ComputingTasks::runOsr(string tmp1)
{
*output << tmp1;
*output << "osr(var1_list_,osr_params_,optim_weights_);\n";
}
//------------------------------------------------------------------------------
void ComputingTasks::setOlr(string tmp1, string tmp2)
void ComputingTasks::setOlrInst(string tmp)
{
*output << tmp1 << tmp2;
*output << "olr(var_list_,olr_inst_,obj_var_,optim_weights_);\n";
*output << tmp;
}
//------------------------------------------------------------------------------
void ComputingTasks::setOptimWeightsInit(void)
void ComputingTasks::runOlr(string tmp1)
{
*output << "% OPTIM_WEIGHTS\n\n";
*output << "optim_weights_ = sparse(endo_nbr,endo_nbr);\n";
*output << "obj_var_ = [];\n\n";
*output << tmp1;
*output << "options_.olr = 1;\n";
*output << "options_.olr_w = optim_weights_;\n";
*output << "options_.olr_inst = olr_inst_;\n";
*output << "info = stoch_simul(var_list_);\n";
}
//------------------------------------------------------------------------------
void ComputingTasks::setOptimWeights1(void)
void ComputingTasks::BeginOptimWeights(void)
{
/*
char buffer[200];
if (p_t->endo_exo != 1 && p_t->endo_exo != 3)
*output << "% OPTIM_WEIGHTS\n\n";
*output << "optim_weights_ = sparse(endo_nbr,endo_nbr);\n";
*output << "obj_var_ = [];\n\n";
}
//------------------------------------------------------------------------------
void ComputingTasks::setOptimWeights(string name, string exp)
{
if (!SymbolTable::Exist(name) || SymbolTable::getType(name) != eEndogenous)
{
fprintf(stdout,"OPTIM_WEIGHTS ERROR: only Endogenousous variables can have weights" );
exit(1);
string msg = "optim_weights: " + name + " isn't an endogenous variable";
error(msg.c_str());
}
sprintf(buffer,"optim_weights_(%d,%d) = ",p_t->nbr+1,p_t->nbr+1);
str_output(buffer);
p_expression(p_q);
str_output(";\n");
sprintf(buffer,"obj_var_ = [obj_var_; %d];\n",p_t->nbr+1);
str_output(buffer);
*/
int id = SymbolTable::getID(name)+1;
*output << "optim_weights_(" << id << "," << id << ") = " << exp << ";\n";
*output << "obj_var_ = [obj_var_; " << id << "];\n";
}
//------------------------------------------------------------------------------
void ComputingTasks::setOptimWeights2(void)
void ComputingTasks::setOptimWeights(string name1, string name2, string exp)
{
/*
char buffer[200];
if ((p_t1->endo_exo != 1 && p_t1->endo_exo != 3) || (p_t2->endo_exo != 1 && p_t2->endo_exo != 3))
if (!SymbolTable::Exist(name1) || SymbolTable::getType(name1) != eEndogenous)
{
fprintf(stdout,"OPTIM_WEIGHTS ERROR: only Endogenousous variables can have weights" );
exit(1);
string msg = "optim_weights: " + name1 + " isn't an endogenous variable";
error(msg.c_str());
}
sprintf(buffer,"optim_weights_(%d,%d) = ",p_t1->nbr+1,p_t2->nbr+1);
str_output(buffer);
p_expression(p_q);
str_output(";\n");
sprintf(buffer,"optim_weights_(%d,%d) = optim_weights_(%d,%d);\n",p_t2->nbr+1,p_t1->nbr+1,p_t1->nbr+1,p_t2->nbr+1);
str_output(buffer);
sprintf(buffer,"obj_var_ = [obj_var_; %d];\n",p_t1->nbr+1);
sprintf(buffer,"obj_var_ = [obj_var_; %d];\n",p_t2->nbr+1);
*/
if (!SymbolTable::Exist(name2) || SymbolTable::getType(name2) != eEndogenous)
{
string msg = "optim_weights: " + name2 + " isn't an endogenous variable";
error(msg.c_str());
}
int id1 = SymbolTable::getID(name1)+1;
int id2 = SymbolTable::getID(name2)+1;
*output << "optim_weights_(" << id1 << "," << id2 << ") = " << exp << ";\n";
*output << "obj_var_ = [obj_var_; " << id1 << " " << id2 << "];\n";
}
//------------------------------------------------------------------------------
void ComputingTasks::runDynasave(string filename, string ext, string varlist)
{
*output << varlist;
*output << "dynasave(" << filename;
if (ext.size() > 0)
{
*output << "," << ext;
}
*output << ",varlist_);\n";
}
void ComputingTasks::runDynatype(string filename, string ext, string varlist)
{
*output << varlist;
*output << "dynatype(" << filename;
if (ext.size() > 0)
{
*output << "," << ext;
}
*output << ",varlist_);\n";
}
void ComputingTasks::beginModelComparison(void)
{
*output << "ModelNames_ = {};\n";
*output << "ModelPriors_ = {};\n";
}
void ComputingTasks::addMcFilename(string filename, string prior)
{
*output << "ModelNames_ = { ModelNames_{:} '" << filename << "};\n";
*output << "ModelPriors_ = { ModelPriors_{:} '" << prior << "};\n";
}
void ComputingTasks::runModelComparison(void)
{
*output << "model_comparison(ModelNames_,ModelPriors_);\n";
}
/*
string ComputingTasks::get(void)
{
......
......@@ -15,8 +15,8 @@ using namespace std;
#include <time.h>
//------------------------------------------------------------------------------
#include "DynareBison.h"
#include "VariableTable.h"
#include "d_tab.h"
#include "NumericalConstants.h"
#include "DataTree.h"
//------------------------------------------------------------------------------
......
......@@ -13,7 +13,7 @@
#define YYERROR_VERBOSE
#define YLMM_PARSER_CLASS dynare::parser
#define YLMM_LEX_STATIC
#include "yaccmm.h"
#include "ylmm/yaccmm.hh"
#ifdef yyerror
#undef yyerror
#define yyerror _parser->error
......@@ -21,22 +21,29 @@
%}
/* %pure_parser */
%token SIGMA_E INITVAL ENDVAL HISTVAL SHOCKS VALUES STDERR CORR MODEL END
%token VAR VAREXO VAREXO_DET PARAMETER PERIODS
%token NAME TEX_NAME INT_NUMBER FLOAT_NUMBER EQUAL
%token DR_ALGO SOLVE_ALGO STOCH_SIMUL STEADY SIMUL CHECK
%token ORDER NOFUNCTIONS REPLIC DROP IRF AR LINEAR HP_FILTER NOCORR SIMUL_SEED USE_DLL
%token HP_NGRID HP_NGRIDDR_ALGO SIMUL_ALGO QZ_CRITERIUM NOMOMENTS
%token VAROBS ESTIMATION OBSERVATION_TRENDS UNIT_ROOT_VARS
%token PERC DATAFILE NOBS FIRST_OBS
%token MH_REPLIC MH_DROP
%token MH_JSCALE OPTIM MH_INIT_SCALE MODE_FILE MODE_COMPUTE MODE_CHECK
%token PRIOR_TRUNC MH_MODE MH_NBLOCKS LOAD_MH_FILE LOGLINEAR
%token NODIAGNOSTIC NOGRAPH PRESAMPLE CONF_SIG LIK_INIT PREFILTER LIK_ALGO
%token ESTIMATED_PARAMS GAMMA_PDF BETA_PDF NORMAL_PDF INV_GAMMA_PDF UNIFORM_PDF
%token INV_GAMMA1_PDF INV_GAMMA2_PDF
%token KALMAN_ALGO KALMAN_TOL FORECAST SMOOTHER BAYESIAN_IRF MOMENTS_VARENDO
%token FILTERED_VARS RELATIVE_IRF TEX
%token AR AUTOCORR
%token BAYESIAN_IRF BETA_PDF
%token CALIB CALIB_VAR CHECK CONF_SIG CORR COVAR
%token DATAFILE DIAGNOSTIC DIFFUSE_D DOLLAR DR_ALGO DROP DSAMPLE DYN2VEC DYNASAVE DYNATYPE
%token END ENDVAL EQUAL ESTIMATION ESTIMATED_PARAMS ESTIMATED_PARAMS_BOUNDS ESTIMATED_PARAMS_INIT
%token FILTERED_VARS FIRST_OBS FLOAT_NUMBER FORECAST FUNCTIONS
%token GAMMA_PDF GRAPH
%token HISTVAL HP_FILTER HP_NGRID
%token INITVAL INITVALF INT_NUMBER INV_GAMMA_PDF INV_GAMMA1_PDF INV_GAMMA2_PDF IRF
%token KALMAN_ALGO KALMAN_TOL
%token LAPLACE LIK_ALGO LIK_INIT LINEAR LOAD_MH_FILE LOGLINEAR
%token MH_DROP MH_INIT_SCALE MH_JSCALE MH_MODE MH_NBLOCKS MH_REPLIC MODE_CHECK MODE_COMPUTE MODE_FILE MODEL MODEL_COMPARISON MODEL_COMPARISON_APPROXIMATION MODIFIEDHARMONICMEAN MOMENTS MOMENTS_VARENDO MSHOCKS
%token NAME NK NOBS NOCORR NODIAGNOSTIC NOFUNCTIONS NOGRAPH NOMOMENTS NOPRINT NORMAL_PDF
%token OBSERVATION_TRENDS OLR OLR_INST OLR_BETA OPTIM OPTIM_WEIGHTS ORDER OSR OSR_PARAMS
%token PARAMETERS PERIODS PREFILTER PRESAMPLE PRINT PRIOR_TRUNC
%token QZ_CRITERIUM
%token RELATIVE_IRF REPLIC RESOL RPLOT
%token SHOCKS SHOCK_SIZE SIGMA_E SIMUL SIMUL_ALGO SIMUL_SEED SMOOTHER SOLVE_ALGO STDERR STEADY STOCH_SIMUL
%token TEX TEX_NAME
%token UNIFORM_PDF UNIT_ROOT_VARS USE_DLL
%token VALUES VAR VAREXO VAREXO_DET VAROBS
%token XTICK XTICKLABEL
%left COMMA
%left PLUS MINUS
%left TIMES DIVIDE
%left UMINUS
......@@ -47,8 +54,8 @@
statement_list
: statement
| statement_list statement
;
| statement_list statement
;
statement
: declaration
......@@ -66,10 +73,11 @@
| stoch_simul
| estimation
| estimated_params
| estimated_params_bounds
| estimated_params_init
| varobs
| observation_trends
| unit_root_vars
/*
| dsample
| rplot
| optim_weights
......@@ -81,7 +89,7 @@
| dynasave
| olr
| olr_inst
*/
| model_comparison
;
......@@ -93,6 +101,12 @@
;
dsample : DSAMPLE INT_NUMBER ';' {_parser->option_num("dsample",$2);}
| DSAMPLE INT_NUMBER INT_NUMBER ';' {_parser->option_num("dsample",$2,$3);}
;
rplot : RPLOT tmp_var_list ';' {_parser->rplot();}
;
var
: VAR var_list ';'
;
......@@ -106,19 +120,19 @@
;
parameters
: PARAMETER parameter_list ';'
: PARAMETERS parameter_list ';'
;
var_list
: var_list NAME
{$$ = _parser->add_endogenous($2);}
| var_list ',' NAME
| var_list COMMA NAME
{$$ = _parser->add_endogenous($3);}
| NAME
{$$ = _parser->add_endogenous($1);}
| var_list NAME TEX_NAME