goto error;
tok = isl_stream_next_token(s);
switch (tok->type) {
+ case ISL_TOKEN_LT:
+ case ISL_TOKEN_GT:
case ISL_TOKEN_LE:
case ISL_TOKEN_GE:
case '=':
isl_seq_combine(bmap->ineq[k], (*v)->ctx->one, aff1->el,
(*v)->ctx->negone, aff2->el,
aff1->size);
- else {
+ else if (tok->type == ISL_TOKEN_LT) {
+ isl_seq_combine(bmap->ineq[k], (*v)->ctx->negone, aff1->el,
+ (*v)->ctx->one, aff2->el,
+ aff1->size);
+ isl_int_sub_ui(bmap->ineq[k][0], bmap->ineq[k][0], 1);
+ } else if (tok->type == ISL_TOKEN_GT) {
+ isl_seq_combine(bmap->ineq[k], (*v)->ctx->one, aff1->el,
+ (*v)->ctx->negone, aff2->el,
+ aff1->size);
+ isl_int_sub_ui(bmap->ineq[k][0], bmap->ineq[k][0], 1);
+ } else {
isl_seq_combine(bmap->ineq[k], (*v)->ctx->one, aff1->el,
(*v)->ctx->negone, aff2->el,
aff1->size);
}
if (c == '>') {
int c;
+ tok = isl_token_new(s->ctx, line, col, old_line != line);
+ if (!tok)
+ return NULL;
if ((c = isl_stream_getc(s)) == '=') {
- tok = isl_token_new(s->ctx, line, col, old_line != line);
- if (!tok)
- return NULL;
tok->type = ISL_TOKEN_GE;
return tok;
}
if (c != -1)
isl_stream_ungetc(s, c);
+ tok->type = ISL_TOKEN_GT;
+ return tok;
}
if (c == '<') {
int c;
+ tok = isl_token_new(s->ctx, line, col, old_line != line);
+ if (!tok)
+ return NULL;
if ((c = isl_stream_getc(s)) == '=') {
- tok = isl_token_new(s->ctx, line, col, old_line != line);
- if (!tok)
- return NULL;
tok->type = ISL_TOKEN_LE;
return tok;
}
if (c != -1)
isl_stream_ungetc(s, c);
+ tok->type = ISL_TOKEN_LT;
+ return tok;
}
if (c == '&') {
tok = isl_token_new(s->ctx, line, col, old_line != line);
enum isl_token_type { ISL_TOKEN_UNKNOWN = 256, ISL_TOKEN_VALUE,
ISL_TOKEN_IDENT, ISL_TOKEN_GE,
- ISL_TOKEN_LE, ISL_TOKEN_TO, ISL_TOKEN_AND,
+ ISL_TOKEN_LE, ISL_TOKEN_GT, ISL_TOKEN_LT,
+ ISL_TOKEN_TO, ISL_TOKEN_AND,
ISL_TOKEN_OR, ISL_TOKEN_EXISTS };
struct isl_token {