(int i)
| 1261 | /// |
| 1262 | /// True if the input matched the expression |
| 1263 | protected boolean matchAt(int i) { |
| 1264 | // Initialize start pointer, paren cache and paren count |
| 1265 | start0 = -1; |
| 1266 | end0 = -1; |
| 1267 | start1 = -1; |
| 1268 | end1 = -1; |
| 1269 | start2 = -1; |
| 1270 | end2 = -1; |
| 1271 | startn = null; |
| 1272 | endn = null; |
| 1273 | parenCount = 1; |
| 1274 | setParenStart(0, i); |
| 1275 | |
| 1276 | // Allocate backref arrays (unless optimizations indicate otherwise) |
| 1277 | if ((program.flags & REProgram.OPT_HASBACKREFS) != 0) { |
| 1278 | startBackref = new int[maxParen]; |
| 1279 | endBackref = new int[maxParen]; |
| 1280 | } |
| 1281 | |
| 1282 | // Match against string |
| 1283 | int idx; |
| 1284 | if ((idx = matchNodes(0, maxNode, i)) != -1) { //NOPMD AssignmentInOperand |
| 1285 | setParenEnd(0, idx); |
| 1286 | return true; |
| 1287 | } |
| 1288 | |
| 1289 | // Didn't match |
| 1290 | parenCount = 0; |
| 1291 | return false; |
| 1292 | } |
| 1293 | |
| 1294 | /// Matches the current regular expression program against a character array, |
| 1295 | /// starting at a given index. |
no test coverage detected