Lines Matching defs:SRE
16 SRE(at)(SRE_STATE* state, const SRE_CHAR* ptr, SRE_CODE at)
104 SRE(charset)(SRE_STATE* state, const SRE_CODE* set, SRE_CODE ch)
191 SRE(charset_loc_ignore)(SRE_STATE* state, const SRE_CODE* set, SRE_CODE ch)
195 if (SRE(charset)(state, set, lo))
199 return up != lo && SRE(charset)(state, set, up);
202 LOCAL(Py_ssize_t) SRE(match)(SRE_STATE* state, const SRE_CODE* pattern, int toplevel);
205 SRE(count)(SRE_STATE* state, const SRE_CODE* pattern, Py_ssize_t maxcount)
222 while (ptr < end && SRE(charset)(state, pattern + 2, *ptr))
320 i = SRE(match)(state, pattern, 0);
336 /* The macros below should be used to protect recursive SRE(match)()
340 * - Recursive SRE(match)() returned true: that's usually a success
344 * - Recursive SRE(match)() returned false but the current SRE(match)()
345 * is returning to the caller: If the current SRE(match)() is the
348 * If it's *not* the top function, it will be a recursive SRE(match)()
349 * failure by itself, and the calling SRE(match)() will have to deal
353 * - Recursive SRE(match)() returned false, and will continue the
357 * - Recursive SRE(match)() returned false, and will be called again
359 * loop iteration, since the recursive SRE(match)() could do anything,
395 DATA_STACK_LOOKUP_AT(state, SRE(match_context), ctx, ctx_pos); \
415 DATA_STACK_LOOKUP_AT(state, SRE(match_context), ctx, ctx_pos); \
493 DATA_ALLOC(SRE(match_context), nextctx); \
525 } SRE(match_context);
560 SRE(match)(SRE_STATE* state, const SRE_CODE* pattern, int toplevel)
568 SRE(match_context)* ctx;
569 SRE(match_context)* nextctx;
573 DATA_ALLOC(SRE(match_context), ctx);
670 if (!SRE(at)(state, ptr, *pattern))
709 !SRE(charset)(state, pattern + 1, *ptr))
778 || !SRE(charset)(state, pattern+1,
788 || !SRE(charset)(state, pattern+1,
798 || !SRE(charset_loc_ignore)(state, pattern+1, *ptr))
827 !SRE(charset)(state, pattern + 3,
864 ret = SRE(count)(state, pattern+3, pattern[2]);
866 DATA_LOOKUP_AT(SRE(match_context), ctx, ctx_pos);
967 ret = SRE(count)(state, pattern+3, pattern[1]);
969 DATA_LOOKUP_AT(SRE(match_context), ctx, ctx_pos);
1009 ret = SRE(count)(state, pattern+3, 1);
1011 DATA_LOOKUP_AT(SRE(match_context), ctx, ctx_pos);
1044 ret = SRE(count)(state, pattern + 3, pattern[2]);
1046 DATA_LOOKUP_AT(SRE(match_context), ctx, ctx_pos);
1566 DATA_LOOKUP_AT(SRE(match_context), ctx, ctx_pos);
1626 /* need to reset capturing groups between two SRE(match) callings in loops */
1631 SRE(search)(SRE_STATE* state, SRE_CODE* pattern)
1703 status = SRE(match)(state, pattern + 2*prefix_skip, 0);
1749 status = SRE(match)(state, pattern + 2*prefix_skip, 0);
1768 while (ptr < end && !SRE(charset)(state, charset, *ptr))
1775 status = SRE(match)(state, pattern, 0);
1786 status = SRE(match)(state, pattern, 1);
1800 status = SRE(match)(state, pattern, 0);
1809 #undef SRE