isl_map_read_from_str: accept ranges inside tuples
commit4b5b468580cfd385571731196d1eef1cf69112fd
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Wed, 1 May 2019 13:23:11 +0000 (1 15:23 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Tue, 18 Jun 2019 21:34:15 +0000 (18 23:34 +0200)
treea0288ff039a678b59ca868ecc9fd67efe33b3df5
parent54772874ba74946d10bfc1fdc850ac9bea023aac
isl_map_read_from_str: accept ranges inside tuples

That is, allow the set { [i] : 1 <= i <= 9 } to be represented
as { [1:9] }.
This notation is also used by Omega and isl tries to support
Omega syntax as much as possible.
Alternatives for the colon are comma and "-",
but comma is already used to separate entries
in a tuple and "-" is already used as minus.
Another alternative is "..", support for which may
get added later.

Support for this notation is only added now,
because the colon is already used to separate expressions
from constraints in piecewise affine expressions and
it therefore seemed tricky to also support the range notation.
However, a distinction can still be made relatively easily
by analyzing what appears after the colon.
In particular, if it looks like a condition, then it is considered
part of a piecewise expression.  Otherwise, if it is an affine
expression, then it is considered as part of a range.

Reviewed-by: Michael Kruse <MichaelKruse@meinersbur.de>
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
isl_input.c
isl_test.c