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