summaryrefslogtreecommitdiff
path: root/mtxexpression.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mtxexpression.cc')
-rw-r--r--mtxexpression.cc19
1 files changed, 7 insertions, 12 deletions
diff --git a/mtxexpression.cc b/mtxexpression.cc
index 10f2b1b..3c39ae2 100644
--- a/mtxexpression.cc
+++ b/mtxexpression.cc
@@ -33,10 +33,7 @@
using namespace std;
/*
- * Each line of the array indicates a level of precedence. Lines must
- * be ordered in reverse order of precedence, e.g. = has low precedence,
- * so it is placed in first line. Operators of same precedence must have
- * the same associativity (this is never checked).
+ * See mtxexpression.h.
*/
struct mtx_operator MtxExpression::operators[][6] =
{
@@ -229,11 +226,9 @@ MtxExpression::MtxExpression(MtxLanguage *language,
if (!((function == MTXEXPRESSION_FUNCTION_ADDITION
|| function == MTXEXPRESSION_FUNCTION_SUBTRACTION)
&& first_operand.empty()))
- expressions.push_back(new MtxExpression(language, first_operand,
- silent));
+ expressions.push_back(new MtxExpression(language, first_operand));
- expressions.push_back(new MtxExpression(language, second_operand,
- silent));
+ expressions.push_back(new MtxExpression(language, second_operand));
}
else if (lexical_elements[0] == "[" && lexical_elements.back() == "]")
@@ -246,7 +241,7 @@ MtxExpression::MtxExpression(MtxLanguage *language,
lexical_elements.erase(lexical_elements.begin());
lexical_elements.erase(lexical_elements.end() - 1);
- parseMatrix(lexical_elements, symbols, rows, columns, silent);
+ parseMatrix(lexical_elements, symbols, rows, columns);
rationals = new MtxRational[rows * columns];
i = 0;
@@ -318,7 +313,7 @@ MtxExpression::freeMatrix(vector<MtxSymbol *> &symbols) const
void
MtxExpression::parseMatrix(const mtx_expression_t &lexical_elements,
vector<MtxSymbol *> &symbols,
- size_t &rows, size_t &columns, bool silent) const
+ size_t &rows, size_t &columns) const
{
mtx_expression_t::const_iterator iterator;
size_t p_level, b_level, tmp_columns;
@@ -365,7 +360,7 @@ MtxExpression::parseMatrix(const mtx_expression_t &lexical_elements,
tmp_columns = 0;
}
- symbols.push_back(new MtxExpression(language, tmp, silent));
+ symbols.push_back(new MtxExpression(language, tmp));
tmp.clear();
}
@@ -400,7 +395,7 @@ MtxExpression::parseMatrix(const mtx_expression_t &lexical_elements,
else if (tmp_columns != columns)
MATRIX_DIMENSIONS_ERROR(symbols);
- symbols.push_back(new MtxExpression(language, tmp, silent));
+ symbols.push_back(new MtxExpression(language, tmp));
}
if (symbols.size() != (rows * columns))