if (c == '(' ||
c == ')' ||
c == '+' ||
- c == '/' ||
c == '*' ||
c == '%' ||
c == '^' ||
tok->u.s = strdup("||");
return tok;
}
+ if (c == '/') {
+ tok = isl_token_new(s->ctx, line, col, old_line != line);
+ if (!tok)
+ return NULL;
+ if ((c = isl_stream_getc(s)) != '\\' && c != -1) {
+ tok->type = (enum isl_token_type) '/';
+ isl_stream_ungetc(s, c);
+ } else {
+ tok->u.s = strdup("/\\");
+ tok->type = ISL_TOKEN_AND;
+ }
+ return tok;
+ }
+ if (c == '\\') {
+ tok = isl_token_new(s->ctx, line, col, old_line != line);
+ if (!tok)
+ return NULL;
+ if ((c = isl_stream_getc(s)) != '/' && c != -1) {
+ tok->type = (enum isl_token_type) '\\';
+ isl_stream_ungetc(s, c);
+ } else {
+ tok->u.s = strdup("\\/");
+ tok->type = ISL_TOKEN_OR;
+ }
+ return tok;
+ }
if (c == '!') {
tok = isl_token_new(s->ctx, line, col, old_line != line);
if (!tok)