Before, we called accept_affine to parse an integer division that appears
inside a function, but accept_affine also parses a subsequent '*' and
then expects this '*' to be followed by a constant.
Call accept_div directly intead.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
int pow;
isl_stream_push_token(s, tok);
- pwaff = accept_affine(s, isl_map_get_space(map), v);
+ pwaff = accept_div(s, isl_map_get_space(map), v);
pow = optional_power(s);
pwqp = isl_pw_qpolynomial_from_pw_aff(pwaff);
pwqp = isl_pw_qpolynomial_pow(pwqp, pow);
test_parse_pwqp(ctx, "{ [i] -> i + [ (i + [i/3])/2 ] }");
test_parse_map(ctx, "{ S1[i] -> [([i/10]),i%10] : 0 <= i <= 45 }");
test_parse_pwaff(ctx, "{ [i] -> [i + 1] : i > 0; [a] -> [a] : a < 0 }");
+ test_parse_pwqp(ctx, "{ [x] -> ([(x)/2] * [(x)/3]) }");
}
void test_read(struct isl_ctx *ctx)