(int start)
| 210 | } |
| 211 | |
| 212 | private void mustStartMatchAt(int start) { |
| 213 | int previous = -1; |
| 214 | for (int pc = head; pc >= 0; ) { |
| 215 | int nextPC = next[pc] - 1; |
| 216 | if (start + 1 == offsets[pc][0]) { |
| 217 | previous = pc; |
| 218 | } else { |
| 219 | next[pc] = 0; |
| 220 | offsets[pc] = null; |
| 221 | if (pc == tail) { |
| 222 | head = tail = -1; |
| 223 | } else if (previous < 0) { |
| 224 | head = nextPC; |
| 225 | } else { |
| 226 | next[previous] = 1 + nextPC; |
| 227 | } |
| 228 | } |
| 229 | pc = nextPC; |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | private int startOffset(int pc) { |
| 234 | return offsets[pc][0] - 1; |