From 395b97aeac4ac25dca32bd8480441ce64c17f7d9 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 17 Sep 2010 18:02:17 +0200 Subject: [PATCH] shell/math: better comment. no code changes Signed-off-by: Denys Vlasenko --- shell/math.c | 4 ++-- 1 file 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) { -- 2.25.1