Loading ...
Sorry, an error occurred while loading the content.

72235Re: NFA-regexp problem in Vim 7.4a.24

Expand Messages
  • glts
    Jul 16, 2013
      On Tue, Jul 16, 2013 at 8:41 PM, glts <676c7473@...> wrote:
      > On Tue, Jul 16, 2013 at 1:38 PM, Ingo Karkat <swdev@...> 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.

      I bisected the reduced example.

      The first bad revision is:
      changeset: 4813:bc3f4804cf47
      tag: v7-3-1153
      user: Bram Moolenaar <bram@...>
      date: Sun Jun 09 16:24:45 2013 +0200
      summary: updated for version 7.3.1153

      --
      --
      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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 4 messages in this topic