From: Sven Verdoolaege Date: Mon, 16 Aug 2010 12:36:58 +0000 (+0200) Subject: isl_input.c: read_term: allow terms starting with negative constant X-Git-Tag: isl-0.04~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=030a5fcdc2047f3ed59d11ab085482641421dc02;p=platform%2Fupstream%2Fisl.git isl_input.c: read_term: allow terms starting with negative constant In particular, we used to fail to parse "1-3x" because -3 is treated as a negative constant. Now, we treat is in the same way as "1+-3x". Signed-off-by: Sven Verdoolaege --- diff --git a/isl_input.c b/isl_input.c index 075ad8d..10c4820 100644 --- a/isl_input.c +++ b/isl_input.c @@ -1319,9 +1319,8 @@ static __isl_give isl_qpolynomial *read_term(struct isl_stream *s, isl_int_is_neg(tok->u.v)) { struct isl_qpolynomial *qp2; - qp2 = isl_qpolynomial_cst(isl_basic_map_get_dim(bmap), - tok->u.v); - isl_token_free(tok); + isl_stream_push_token(s, tok); + qp2 = read_factor(s, bmap, v); qp = isl_qpolynomial_add(qp, qp2); } else { isl_stream_push_token(s, tok);