Commit ed84e273 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Preprocessor: added new SymbolTable::orig_endo_nbr() method

parent 19338906
......@@ -210,7 +210,7 @@ SymbolTable::writeOutput(ostream &output) const throw (NotYetFrozenException)
<< "M_.param_nbr = " << param_nbr() << ";" << endl;
// Write the auxiliary variable table
output << "M_.orig_endo_nbr = " << endo_nbr() - aux_vars.size() << ";" << endl;
output << "M_.orig_endo_nbr = " << orig_endo_nbr() << ";" << endl;
if (aux_vars.size() == 0)
output << "M_.aux_vars = [];" << endl;
else
......
......@@ -236,6 +236,8 @@ public:
inline int param_nbr() const throw (NotYetFrozenException);
//! Returns the greatest symbol ID (the smallest is zero)
inline int maxID();
//! Get number of user-declared endogenous variables (without the auxiliary variables)
inline int orig_endo_nbr() const throw (NotYetFrozenException);
//! Write output of this class
void writeOutput(ostream &output) const throw (NotYetFrozenException);
//! Mark a symbol as predetermined variable
......@@ -364,4 +366,10 @@ SymbolTable::maxID()
return (size-1);
}
inline int
SymbolTable::orig_endo_nbr() const throw (NotYetFrozenException)
{
return (endo_nbr() - aux_vars.size());
}
#endif
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