isl_stream_next_token: treat "-0" as two tokens '-' and '0'
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 15 Sep 2011 12:25:51 +0000 (14:25 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 15 Sep 2011 12:25:51 +0000 (14:25 +0200)
commit77119eba7479e6352d22a3ce991d48b6ad0884bc
treec3e117054c6d3a1927f9b110460c2ad1aaa9f5fd
parent56b7d238929980e62218525b4b3be121af386edf
isl_stream_next_token: treat "-0" as two tokens '-' and '0'

Usually, a '-' followed by a sequence of digits is treated as a single
(negative) number.  When parsing affine expressions, negative numbers
are allowed without a preceding '+'.  However, if "-0" is parsed as '0'
then there is no way of distinguishing between "-0" and "0" and so "-0"
was not allowed in affine expressions.
We now treat "-0" as two tokens, so that it can be used in affine expressions.
The flip side is that "-0" can no longer be used where a single integer
is expected.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_stream.c
isl_test.c