| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.020 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.020 |
| Problem: NFA engine matches too much with \@>. (John McGowan) |
| Solution: When a whole pattern match is found stop searching. |
| Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok |
| |
| |
| |
| |
| |
| *** 5322,5328 **** |
| log_subsexpr(m); |
| #endif |
| nfa_match = TRUE; |
| ! break; |
| |
| case NFA_START_INVISIBLE: |
| case NFA_START_INVISIBLE_FIRST: |
| --- 5322,5331 ---- |
| log_subsexpr(m); |
| #endif |
| nfa_match = TRUE; |
| ! /* See comment above at "goto nextchar". */ |
| ! if (nextlist->n == 0) |
| ! clen = 0; |
| ! goto nextchar; |
| |
| case NFA_START_INVISIBLE: |
| case NFA_START_INVISIBLE_FIRST: |
| |
| |
| |
| *** 427,432 **** |
| --- 427,433 ---- |
| :""""" \@> |
| :call add(tl, [2, '\(a*\)\@>a', 'aaaa']) |
| :call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa']) |
| + :call add(tl, [2, '^\(.\{-}b\)\@>.', ' abcbd', ' abc', ' ab']) |
| :" TODO: BT engine does not restore submatch after failure |
| :call add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa']) |
| :" |
| |
| |
| |
| *** 983,988 **** |
| --- 983,991 ---- |
| OK 0 - \(a*\)\@>b |
| OK 1 - \(a*\)\@>b |
| OK 2 - \(a*\)\@>b |
| + OK 0 - ^\(.\{-}b\)\@>. |
| + OK 1 - ^\(.\{-}b\)\@>. |
| + OK 2 - ^\(.\{-}b\)\@>. |
| OK 0 - \(a*\)\@>a\|a\+ |
| OK 2 - \(a*\)\@>a\|a\+ |
| OK 0 - \_[^8-9]\+ |
| |
| |
| |
| *** 740,741 **** |
| --- 740,743 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 20, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 173. You keep tracking down the email addresses of all your friends |
| (even childhood friends). |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |