Lines Matching refs:cursor

67 #define eat(p)		do{if ((p)->token.push)(p)->token.push=0;else (p)->cursor+=(p)->token.len;}while (0)
119 unsigned char* cursor; /* curent point in re */
657 sp = (char*)env->cursor + env->token.len;
740 env->token.len = sp - (char*)env->cursor;
809 if (env->type == KRE && *(env->cursor + env->token.len) == '-' && *(env->cursor + env->token.len + 1) == '(')
814 if (env->type == KRE && *(env->cursor + env->token.len) == '(')
877 sp = (char*)env->cursor + env->token.len;
901 env->cursor = (unsigned char*)sp;
926 if ((env->token.len = MBSIZE(env->cursor)) > 1)
931 c = *env->cursor;
940 c = *++env->cursor;
947 env->cursor++;
957 env->pattern = env->cursor + 1;
972 if (!(c = *(env->cursor + 1)) || c == env->terminator)
979 env->token.len += MBSIZE(env->cursor + 1);
988 env->token.len += MBSIZE(env->cursor + 1);
1006 if (env->type == BRE && (*(env->cursor + 1) == 0 || *(env->cursor + 1) == env->delimiter || *(env->cursor + 1) == env->terminator || *(env->cursor + 1) == '\\' && *(env->cursor + 2) == ')') || (env->flags & REG_MULTIPLE) && *(env->cursor + 1) == '\n')
1011 if (env->type == BRE && (env->cursor == env->pattern || posixkludge == 1))
1024 while (*(env->cursor + env->token.len) == c)
1195 if (*env->cursor == '^' || env->type >= SRE && *env->cursor == '!')
1197 env->cursor++;
1202 first = env->cursor;
1204 if (*env->cursor == 0 || *(env->cursor + 1) == 0 || *env->cursor == env->terminator || *(env->cursor + 1) == env->terminator || (env->flags & REG_ESCAPE) && (*env->cursor == env->delimiter || *env->cursor != '\\' && *(env->cursor + 1) == env->delimiter))
1206 begin = env->cursor + MBSIZE(env->cursor);
1215 if (!(c = *env->cursor) || c == env->terminator || c == env->delimiter && (env->flags & REG_ESCAPE))
1217 env->cursor += (w = MBSIZE(env->cursor));
1218 if (c == '\\' && ((env->flags & REG_CLASS_ESCAPE) || *env->cursor == env->delimiter && (env->flags & REG_ESCAPE)))
1220 if (*env->cursor)
1222 if (*env->cursor == 'n')
1224 env->cursor++;
1230 w = magic(env, *env->cursor, 2);
1241 env->cursor++;
1258 env->cursor += env->token.len;
1266 if (env->cursor == begin)
1286 if (!inrange && env->cursor != begin && *env->cursor != ']')
1301 switch (*env->cursor)
1313 if (!(f = regclass((char*)env->cursor, (char**)&env->cursor)))
1315 if (env->cursor == start && (c = *(env->cursor + 1)))
1317 s = start = env->cursor + 1;
1337 env->cursor = s + 3;
1364 if ((c = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)buf, sizeof(buf), NiL)) < 0)
1378 if ((c = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)buf, sizeof(buf), NiL)) < 0)
1387 if (*env->cursor == env->terminator || *env->cursor == env->delimiter && (env->flags & REG_ESCAPE))
1478 env->cursor = first;
1482 if ((c = *env->cursor) == 0 || c == env->terminator || (env->flags & REG_ESCAPE) && c == env->delimiter)
1484 pp = env->cursor;
1485 env->cursor += (w = MBSIZE(env->cursor));
1486 if (c == '\\' && ((env->flags & REG_CLASS_ESCAPE) || *env->cursor == env->delimiter && (env->flags & REG_ESCAPE)))
1488 if (*env->cursor)
1490 if (*env->cursor == 'n')
1492 pp = env->cursor++;
1498 w = magic(env, *env->cursor, 2);
1509 env->cursor++;
1520 env->cursor += env->token.len;
1528 if (env->cursor == begin)
1545 if (!inrange && env->cursor != begin && *env->cursor != ']')
1559 switch (*env->cursor)
1568 if (!(f = regclass((char*)env->cursor, (char**)&env->cursor)))
1570 if (env->cursor == start && (c = *(env->cursor + 1)) && *(env->cursor + 2) == ':' && *(env->cursor + 3) == ']' && *(env->cursor + 4) == ']')
1586 env->cursor += 5;
1607 rp = env->cursor + 1;
1608 if ((rw = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)pp, COLL_KEY_MAX, &wc)) < 0)
1679 if ((w = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)pp, COLL_KEY_MAX, NiL)) < 0)
1685 if (*env->cursor == env->terminator || *env->cursor == env->delimiter && (env->flags & REG_ESCAPE))
2015 if (!(c = *env->cursor))
2017 env->cursor++;
2022 if (!(c = *(env->cursor + 1)) || c == env->terminator)
2029 p = env->cursor;
2030 c = chresc((char*)env->cursor - 1, (char**)&env->cursor);
2031 *escaped = env->cursor - p;
2056 beg = env->pattern == env->cursor - env->token.len;
2057 if (!(c = env->token.lex) && (c = *env->cursor))
2058 env->cursor++;
2280 e->re.nest.primary = isalnum(*env->cursor) ? -1 : *env->cursor;
2289 env->cursor -= esc + 1;
2387 if (isdigit(*env->cursor))
2397 c = c * 10 + (*env->cursor++ - '0');
2398 } while (isdigit(*env->cursor));
2399 if (*env->cursor++ != ')')
2419 if (env->type < SRE && *env->cursor++ != '?')
2448 p = env->cursor;
2450 while (c = *env->cursor)
2452 if (c == '\\' && *(env->cursor + 1))
2453 env->cursor++;
2460 env->cursor++;
2467 if (*++env->cursor != ')')
2472 env->cursor++;
2484 e->re.exec.size = env->cursor - p - 2;
2493 while (isdigit(*env->cursor))
2500 c = c * 10 + *env->cursor++ - '0';
2502 if (*env->cursor == ')')
2504 env->cursor++;
2540 env->pattern = env->cursor;
2606 p = env->cursor;
2733 env->error = (*env->cursor == 0 || *env->cursor == env->delimiter || *env->cursor == env->terminator) ? REG_EPAREN : REG_ENULL;
2779 p = env->cursor;
2788 env->literal = env->cursor;
2861 if (e && *env->cursor != 0 && *env->cursor != env->delimiter && *env->cursor != env->terminator)
3330 env.literal = env.pattern = env.cursor = (unsigned char*)pattern;
3394 p->re_npat = env.cursor - env.pattern + 1;
3395 if (*env.cursor == env.delimiter)