summaryrefslogtreecommitdiffhomepage
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-09-17 18:02:17 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-09-17 18:02:17 +0200
commit395b97aeac4ac25dca32bd8480441ce64c17f7d9 (patch)
treea4d077b4c6282c7ed8c100165c02d24f7a9411cc /shell
parentc8f9a8d3c0f9e5d47cc650bf0425926b03e8bbc6 (diff)
shell/math: better comment. no code changes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/math.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/math.c b/shell/math.c
index 9d3b912a7..760645d0f 100644
--- a/shell/math.c
+++ b/shell/math.c
@@ -652,10 +652,10 @@ evaluate_string(arith_state_t *math_state, const char *expr)
* integer stack.
* But for binary operators, "apply" everything on the operator
* stack until we find an operator with a lesser priority than the
- * one we have just extracted.
+ * one we have just extracted. If op is right-associative,
+ * then stop "applying" on the equal priority too.
* Left paren is given the lowest priority so it will never be
* "applied" in this way.
- * if associativity is right and priority eq, applied also skip
*/
prec = PREC(op);
if ((prec > 0 && prec < UNARYPREC) || prec == SPEC_PREC) {