| ▲ | mananaysiempre 5 hours ago | |
Right, the explanation seems to be a bit oversimplified, but I don’t think it’s difficult to fix it up: you need to collect non-overlapping starts (with an RTL scan) and ends (with an LTR scan) and zip them together. The non-overlapping matches are the last ones you see before you need to reset the matcher (traverse a failing edge). This feels like it should work. (I tried to write some pseudocode here but got annoyed dealing with edge cases like zero-length matches at EOF, sorry.) | ||