Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
bc62662f
Commit
bc62662f
authored
Jun 24, 2010
by
Houtan Bastani
Browse files
DSGE-Var: bug fix. Add init param statement at the before the estimation statement
parent
3aaccc59
Changes
2
Hide whitespace changes
Inline
Side-by-side
preprocessor/ModFile.cc
View file @
bc62662f
...
...
@@ -86,6 +86,12 @@ ModFile::addStatement(Statement *st)
statements
.
push_back
(
st
);
}
void
ModFile
::
addStatementAtFront
(
Statement
*
st
)
{
statements
.
insert
(
statements
.
begin
(),
st
);
}
void
ModFile
::
checkPass
()
{
...
...
@@ -226,9 +232,9 @@ ModFile::transformPass()
{
int
sid
=
symbol_table
.
addSymbol
(
"dsge_prior_weight"
,
eParameter
);
if
(
!
mod_file_struct
.
dsge_var_calibrated
.
empty
())
addStatement
(
new
InitParamStatement
(
sid
,
expressions_tree
.
AddNumConstant
(
mod_file_struct
.
dsge_var_calibrated
),
symbol_table
));
addStatement
AtFront
(
new
InitParamStatement
(
sid
,
expressions_tree
.
AddNumConstant
(
mod_file_struct
.
dsge_var_calibrated
),
symbol_table
));
}
catch
(
SymbolTable
::
AlreadyDeclaredException
&
e
)
{
...
...
preprocessor/ModFile.hh
View file @
bc62662f
...
...
@@ -82,6 +82,8 @@ private:
public:
//! Add a statement
void
addStatement
(
Statement
*
st
);
//! Add a statement at the front of the statements vector
void
addStatementAtFront
(
Statement
*
st
);
//! Evaluate all the statements
/*! \param warn_uninit Should a warning be displayed for uninitialized endogenous/exogenous/parameters ? */
void
evalAllExpressions
(
bool
warn_uninit
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment