return "-(" + e.getExpression() + ")";
} else if (expression instanceof ReferenceNumberExpression) {
ReferenceNumberExpression e = (ReferenceNumberExpression) expression;
return e.getVar();
} else if (expression instanceof SimpleNumberExpression) {
SimpleNumberExpression e = (SimpleNumberExpression) expression;
return e.getNumber().toString();
} else if (expression instanceof ComposedNumberExpression) {
ComposedNumberExpression e = (ComposedNumberExpression) expression;
NumberExpression ne = e.getExpressions().get(0);
if (ne == null) {
return "";
}
StringBuilder result = new StringBuilder(verbalize(ne));
for (int i = 0; i < e.getOperators().size(); i++) {
result.append(" " + e.getOperators().get(i) + " ");
if (e.getExpressions().size() > i + 1) {
result.append(verbalize(e.getExpressions().get(i + 1)));
}
}
return result.toString();
} else if (expression instanceof NumberFeatureExpression) {
return verbalize(((NumberFeatureExpression) expression).getFe());