[pcre-dev] [Bug 2761] DFA partial matching does not yield sa…

Pàgina inicial
Delete this message
Autor: admin
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 2761] DFA partial matching does not yield same results as non-partial
https://bugs.exim.org/show_bug.cgi?id=2761

--- Comment #5 from S. Shuck <stevenjshuck@???> ---
I basically agree with Petr. Given the current API, if the DFA matching is
going to be truly never-backtracking, I'd say don't even try to remember the
"12" from the subject. When we hit the '7', our in-progress match of the
"1234" branch has failed, so now we start completely afresh at the '7'. Your
example should result in match failure, as a consequence of never backtracking,
even within a single non-chunked subject.

Some people wouldn't find it useful, but PCRE2 DFA matching already has other
documented limitations compared with regular matching. If we embrace this one,
the example of typing a subject and scanning it in real time, chunked into
single characters, will work the same as non-chunked, all under the
never-backtracking principle.

To summarize, short-term cut losses and make the current API consistent, and
long-term investigate a redesign with possible API changes (e.g. match_data
returning more information than just offset pairs).

P.S. It occurs to me that 0 is probably not the best way to report resumed
matches in the ovector, since that is ambiguous. Maybe a ginormous magic
number?

--
You are receiving this mail because:
You are on the CC list for the bug.