2 * Copyright 2011 Sven Verdoolaege
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege.
9 #define xCAT(A,B) A ## B
10 #define CAT(A,B) xCAT(A,B)
12 #define TYPE CAT(isl_,TYPE_BASE)
14 /* Read an object of type "TYPE" from "s".
16 * In particular, first read the parameters and the opening brace.
17 * Then read the body that is specific to the object type.
18 * Finally, read the closing brace.
20 __isl_give TYPE
*FN(isl_stream_read
,TYPE_BASE
)(__isl_keep isl_stream
*s
)
30 dom
= isl_set_universe(isl_space_params_alloc(s
->ctx
, 0));
31 if (next_is_tuple(s
)) {
32 dom
= read_map_tuple(s
, dom
, isl_dim_param
, v
, 1, 0);
33 if (isl_stream_eat(s
, ISL_TOKEN_TO
))
36 if (isl_stream_eat(s
, '{'))
39 obj
= FN(isl_stream_read_with_params
,TYPE_BASE
)(s
, dom
, v
);
41 if (isl_stream_eat(s
, '}'))