On Tue, Jul 16, 2013 at 1:38 PM, Ingo Karkat <[email protected]> wrote:
> I've found a discrepancy in pattern matching while re-running my
> plugins' test suites. With the new NFA-regexp, a (rather complex,
> generated, used for searching insert mode completion matches) pattern
> does not match any more:
>
> :echo '__mul__sub__und__everywhere__' =~#
> '\V\<\%(m\%(_\@!\k\)\*_\@!\|_\*m\k\+\%(_\|\k\&\A\)\@=\)\%(\%(\%(_\@!\U\)\@<=\%(S\&\u\|\%(\k\&\A\)\+s\)\k\*\|_\@<!\%(S\&\u\|\%(\k\&\A\)\+s\)\l\k\*\)\|_\+s\k\+\)\%(\%(\%(_\@!\U\)\@<=\%(U\&\u\|\%(\k\&\A\)\+u\)\k\*\|_\@<!\%(U\&\u\|\%(\k\&\A\)\+u\)\l\k\*\)\|_\+u\k\+\)\%(\%(\%(_\@!\U\)\@<=\%(E\&\u\|\%(\k\&\A\)\+e\)\k\*\|_\@<!\%(E\&\u\|\%(\k\&\A\)\+e\)\l\k\*\)\|_\+e\k\+\)\>'
>
> To reproduce, use the attached script:
>
> vim -N -u NONE -S bad-re.vim
> 0
> 1
>
> This is with a huge build of Vim 7.4a.24, running in an Ubuntu 13.04
> x64 VM. See attached bad-re.version for more info.
>
> I last ran the test suite successfully with Vim 7.3.1280, so the bug
> must have been introduced since then.

I reduced Ingo's report to the following minimal example.

function! Test(re)
  return 'mx__xe' =~ '\%#=' . a:re . 'm\k\+_\@=\%(_\@!\k\)\@<=\k\+e'
endfunction
for n in [0, 1]
  echo Test(n)
endfor

I can reproduce on current Mercurial tip. Hope it helps.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui