Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
dim = set_name(dim, type, i, v->v->name);
isl_token_free(tok);
} else if (tok->type == ISL_TOKEN_IDENT ||
- tok->type == ISL_TOKEN_VALUE) {
+ tok->type == ISL_TOKEN_VALUE ||
+ tok->type == '-') {
if (type == isl_dim_param) {
isl_stream_error(s, tok,
"expecting unique identifier");
static char *srcdir;
+void test_parse(struct isl_ctx *ctx)
+{
+ isl_map *map;
+ const char *str;
+
+ str = "{ [i] -> [-i] }";
+ map = isl_map_read_from_str(ctx, str, -1);
+ assert(map);
+ isl_map_free(map);
+}
+
void test_read(struct isl_ctx *ctx)
{
char filename[PATH_MAX];
assert(srcdir);
ctx = isl_ctx_alloc();
+ test_parse(ctx);
test_pwqp(ctx);
test_lex(ctx);
test_sv(ctx);