isl_stream_read_set: accept parameter domains
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 26 Aug 2011 07:57:31 +0000 (09:57 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 3 Sep 2011 10:04:55 +0000 (12:04 +0200)
In particular, accept sets without a tuple, e.g.,

[N] -> { : N >= 1 }

At this moment, no distinction is made between a "parameter domain"
and a zero-dimensional set.  However, this will change in the near
future and so we need to have a different notation for these two
types of sets.  We start by allowing the new notation for parameter
domains.

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

index dd078e5..182dba2 100644 (file)
@@ -1733,6 +1733,12 @@ static struct isl_obj obj_read_body(struct isl_stream *s,
        if (is_rational(s))
                map = isl_map_set_rational(map);
 
+       if (isl_stream_next_token_is(s, ':')) {
+               obj.type = isl_obj_set;
+               obj.v = read_optional_disjuncts(s, map, v);
+               return obj;
+       }
+
        if (!next_is_tuple(s))
                return obj_read_poly_or_fold(s, map, v, n);