From f14fcef36a3a00ebf1ae42faba5b3d030c5b177a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 17 Jul 2024 13:36:12 +0200
Subject: [PATCH] Fix typos

[skip ci]
---
 src/ExprNode.hh      |  2 +-
 src/ModelTree.hh     | 12 ++++++------
 src/ParsingDriver.cc | 14 +++++++-------
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/ExprNode.hh b/src/ExprNode.hh
index e5b47dca..aa503a70 100644
--- a/src/ExprNode.hh
+++ b/src/ExprNode.hh
@@ -1462,7 +1462,7 @@ public:
   [[nodiscard]] expr_t unpackPowerDeriv() const;
   //! Returns MULT_i*(lhs-rhs) = 0, creating multiplier MULT_i
   expr_t addMultipliersToConstraints(int i);
-  //! Returns the non-zero hand-side of an equation (that must have a hand side equal to zero)
+  //! Returns the non-zero hand side of an equation (that must have a hand side equal to zero)
   [[nodiscard]] expr_t getNonZeroPartofEquation() const;
   [[nodiscard]] bool isInStaticForm() const override;
   void fillAutoregressiveRow(int eqn, const vector<int>& lhs,
diff --git a/src/ModelTree.hh b/src/ModelTree.hh
index 512ec862..f6247744 100644
--- a/src/ModelTree.hh
+++ b/src/ModelTree.hh
@@ -776,7 +776,7 @@ ModelTree::writeModelEquations(ostream& output, const temporary_terms_t& tempora
       BinaryOpNode* eq_node {equations[eq]};
       expr_t lhs {eq_node->arg1}, rhs {eq_node->arg2};
 
-      // Test if the right hand side of the equation is empty.
+      // Test if the right-hand side of the equation is empty.
       double vrhs {1.0};
       try
         {
@@ -786,7 +786,7 @@ ModelTree::writeModelEquations(ostream& output, const temporary_terms_t& tempora
         {
         }
 
-      if (vrhs != 0) // The right hand side of the equation is not empty ==> residual=lhs-rhs;
+      if (vrhs != 0) // The right-hand side of the equation is not empty ==> residual=lhs-rhs;
         {
           output << "    residual" << LEFT_ARRAY_SUBSCRIPT(output_type)
                  << eq + ARRAY_SUBSCRIPT_OFFSET(output_type) << RIGHT_ARRAY_SUBSCRIPT(output_type)
@@ -796,7 +796,7 @@ ModelTree::writeModelEquations(ostream& output, const temporary_terms_t& tempora
           rhs->writeOutput(output, output_type, temporary_terms, temporary_terms_idxs);
           output << ");" << endl;
         }
-      else // The right hand side of the equation is empty ==> residual=lhs;
+      else // The right-hand side of the equation is empty ==> residual=lhs;
         {
           output << "residual" << LEFT_ARRAY_SUBSCRIPT(output_type)
                  << eq + ARRAY_SUBSCRIPT_OFFSET(output_type) << RIGHT_ARRAY_SUBSCRIPT(output_type)
@@ -1557,7 +1557,7 @@ ModelTree::writeBytecodeModelEquations(Bytecode::Writer& code_file,
       BinaryOpNode* eq_node {equations[eq]};
       expr_t lhs {eq_node->arg1}, rhs {eq_node->arg2};
       code_file << Bytecode::FNUMEXPR {Bytecode::ExpressionType::ModelEquation, eq};
-      // Test if the right hand side of the equation is empty.
+      // Test if the right-hand side of the equation is empty.
       double vrhs {1.0};
       try
         {
@@ -1567,7 +1567,7 @@ ModelTree::writeBytecodeModelEquations(Bytecode::Writer& code_file,
         {
         }
 
-      if (vrhs != 0) // The right hand side of the equation is not empty ⇒ residual=lhs-rhs
+      if (vrhs != 0) // The right-hand side of the equation is not empty ⇒ residual=lhs-rhs
         {
           lhs->writeBytecodeOutput(code_file, output_type, temporary_terms, temporary_terms_idxs,
                                    tef_terms);
@@ -1576,7 +1576,7 @@ ModelTree::writeBytecodeModelEquations(Bytecode::Writer& code_file,
 
           code_file << Bytecode::FBINARY {BinaryOpcode::minus} << Bytecode::FSTPR {eq};
         }
-      else // The right hand side of the equation is empty ⇒ residual=lhs
+      else // The right-hand side of the equation is empty ⇒ residual=lhs
         {
           lhs->writeBytecodeOutput(code_file, output_type, temporary_terms, temporary_terms_idxs,
                                    tef_terms);
diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc
index eab3dd00..132119df 100644
--- a/src/ParsingDriver.cc
+++ b/src/ParsingDriver.cc
@@ -1288,7 +1288,7 @@ void
 ParsingDriver::add_positive_restriction_element(expr_t value, const string& variable,
                                                 const string& lag)
 {
-  // if the expression is not on the left handside, change its sign
+  // if the expression is not on the left-hand side, change its sign
   if (!svar_left_handside)
     value = add_uminus(value);
 
@@ -1300,7 +1300,7 @@ ParsingDriver::add_positive_restriction_element(const string& variable, const st
 {
   expr_t value(data_tree->One);
 
-  // if the expression is not on the left handside, change its sign
+  // if the expression is not on the left-hand side, change its sign
   if (!svar_left_handside)
     value = add_uminus(value);
 
@@ -1311,7 +1311,7 @@ void
 ParsingDriver::add_negative_restriction_element(expr_t value, const string& variable,
                                                 const string& lag)
 {
-  // if the expression is on the left handside, change its sign
+  // if the expression is on the left-hand side, change its sign
   if (svar_left_handside)
     value = add_uminus(value);
 
@@ -1323,7 +1323,7 @@ ParsingDriver::add_negative_restriction_element(const string& variable, const st
 {
   expr_t value(data_tree->One);
 
-  // if the expression is on the left handside, change its sign
+  // if the expression is on the left-hand side, change its sign
   if (svar_left_handside)
     value = add_uminus(value);
 
@@ -2666,18 +2666,18 @@ ParsingDriver::add_model_equal(expr_t arg1, expr_t arg2, map<string, string> eq_
           }
         catch (SymbolTable::UnknownSymbolNameException&)
           {
-            error("Left hand-side of expression in 'mcp' tag is not a variable");
+            error("Left-hand side of expression in 'mcp' tag is not a variable");
           }
       }()};
 
       if (mod_file->symbol_table.getType(symb_id) != SymbolType::endogenous)
-        error("Left hand-side of expression in 'mcp' tag is not an endogenous variable");
+        error("Left-hand side of expression in 'mcp' tag is not an endogenous variable");
 
       expr_t matched_constant {[&] {
         char* str_end;
         double d = strtod(constant.c_str(), &str_end);
         if (str_end == constant.c_str())
-          error("Right hand-side of expression in 'mcp' tag should be a constant");
+          error("Right-hand side of expression in 'mcp' tag should be a constant");
         return data_tree->AddPossiblyNegativeConstant(d);
       }()};
 
-- 
GitLab