line |
true |
false |
branch |
72
|
2 |
0 |
if (l < 0 || l >= ms->level || ms->capture[l].len == CAP_UNFINISHED) |
|
2 |
0 |
if (l < 0 || l >= ms->level || ms->capture[l].len == CAP_UNFINISHED) |
|
0 |
2 |
if (l < 0 || l >= ms->level || ms->capture[l].len == CAP_UNFINISHED) |
80
|
55 |
0 |
for (level--; level>=0; level--) |
81
|
54 |
1 |
if (ms->capture[level].len == CAP_UNFINISHED) return level; |
89
|
0 |
14 |
if (p == ms->p_end) |
94
|
13 |
17 |
if (*p == '^') p++; |
96
|
0 |
78 |
if (p == ms->p_end) |
98
|
3 |
75 |
if (*(p++) == L_ESC && p < ms->p_end) |
|
3 |
0 |
if (*(p++) == L_ESC && p < ms->p_end) |
100
|
48 |
30 |
} while (*p != ']'); |
126
|
1 |
14 |
return (islower(cl) ? res : !res); |
132
|
19 |
23 |
if (*(p+1) == '^') { |
136
|
57 |
22 |
while (++p < ec) { |
137
|
3 |
54 |
if (*p == L_ESC) { |
139
|
1 |
2 |
if (match_class(c, uchar(*p))) |
142
|
21 |
33 |
else if ((*(p+1) == '-') && (p+2 < ec)) { |
|
21 |
0 |
else if ((*(p+1) == '-') && (p+2 < ec)) { |
144
|
18 |
3 |
if (uchar(*(p-2)) <= c && c <= uchar(*p)) |
|
8 |
10 |
if (uchar(*(p-2)) <= c && c <= uchar(*p)) |
147
|
11 |
22 |
else if (uchar(*p) == c) return sig; |
155
|
19 |
209 |
if (s >= ms->src_end) |
171
|
0 |
1 |
if (p >= ms->p_end - 1) |
173
|
0 |
1 |
if (*s != *p) return NULL; |
178
|
5 |
0 |
while (++s < ms->src_end) { |
179
|
1 |
4 |
if (*s == e) { |
180
|
1 |
0 |
if (--cont == 0) return s+1; |
182
|
0 |
4 |
else if (*s == b) cont++; |
192
|
11 |
5 |
while (singlematch(ms, s + i, p, ep)) |
195
|
5 |
0 |
while (i>=0) { |
197
|
5 |
0 |
if (res) return res; |
208
|
0 |
0 |
if (res != NULL) |
210
|
0 |
0 |
else if (singlematch(ms, s, p, ep)) |
221
|
0 |
67 |
if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures"); |
225
|
29 |
38 |
if ((res=match(ms, s, p)) == NULL) /* match failed? */ |
236
|
17 |
37 |
if ((res = match(ms, s, p)) == NULL) /* match failed? */ |
246
|
2 |
0 |
if ((size_t)(ms->src_end-s) >= len && |
|
1 |
1 |
if ((size_t)(ms->src_end-s) >= len && |
254
|
0 |
274 |
if (ms->matchdepth-- == 0) |
257
|
348 |
63 |
if (p != ms->p_end) { /* end of pattern? */ |
260
|
1 |
66 |
if (*(p + 1) == ')') /* position capture? */ |
271
|
0 |
0 |
if ((p + 1) != ms->p_end) /* is the '$' the last char in pattern? */ |
273
|
0 |
0 |
s = (s == ms->src_end) ? s : NULL; /* check end of string */ |
280
|
1 |
0 |
if (s != NULL) { |
288
|
0 |
12 |
if (*p != '[') |
291
|
10 |
2 |
previous = (s == ms->src_init) ? '\0' : *(s - 1); |
303
|
1 |
1 |
if (s != NULL) { |
315
|
76 |
136 |
if (!singlematch(ms, s, p, ep)) { |
316
|
74 |
2 |
if (*ep == '*' || *ep == '?' || *ep == '-') { /* accept empty? */ |
|
73 |
1 |
if (*ep == '*' || *ep == '?' || *ep == '-') { /* accept empty? */ |
|
0 |
73 |
if (*ep == '*' || *ep == '?' || *ep == '-') { /* accept empty? */ |
326
|
1 |
0 |
if ((res = match(ms, s + 1, ep + 1)) != NULL) |
388
|
57 |
0 |
char *exp = SvPV((SV*)pattern, plen); |
394
|
0 |
57 |
if (flags & ~(RXf_SPLIT)) { |
406
|
1 |
56 |
if (flags & RXf_SPLIT && plen == 1 && exp[0] == ' ') |
|
1 |
0 |
if (flags & RXf_SPLIT && plen == 1 && exp[0] == ' ') |
|
1 |
0 |
if (flags & RXf_SPLIT && plen == 1 && exp[0] == ' ') |
410
|
1 |
56 |
if (plen == 0) |
414
|
13 |
43 |
else if (plen == 1 && exp[0] == '^') |
|
0 |
13 |
else if (plen == 1 && exp[0] == '^') |
418
|
8 |
48 |
else if (plen == 3 && strnEQ("%s+", exp, 3)) |
|
1 |
7 |
else if (plen == 3 && strnEQ("%s+", exp, 3)) |
466
|
80 |
0 |
const char *pat = SvPV((SV*)re->pprivate, plen); |
471
|
1 |
79 |
if (anchor) { |
489
|
63 |
84 |
if (res != NULL) { |
496
|
0 |
63 |
Newxz(re->offs, ms.level + 1, regexp_paren_pair); |
505
|
38 |
63 |
for (i = 0; i < ms.level; i++) { |
507
|
0 |
38 |
if (l == CAP_UNFINISHED) |
509
|
1 |
37 |
if (l == CAP_POSITION) |
522
|
68 |
16 |
} while (s1++ < ms.src_end && !anchor); |
|
67 |
1 |
} while (s1++ < ms.src_end && !anchor); |
582
|
0 |
17 |
XPUSHs(sv_2mortal(newSViv(PTR2IV(&lua_engine)))); |