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

Patch 7.3.1217

Expand Messages
  • Bram Moolenaar
    Patch 7.3.1217 Problem: New regexp engine: Can t handle %[[ao]]. (Yukihiro Nakadaira) Solution: Support nested atoms inside %[]. Files:
    Message 1 of 1 , Jun 17, 2013
    • 0 Attachment
      Patch 7.3.1217
      Problem: New regexp engine: Can't handle \%[[ao]]. (Yukihiro Nakadaira)
      Solution: Support nested atoms inside \%[].
      Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok


      *** ../vim-7.3.1216/src/regexp_nfa.c 2013-06-16 22:49:09.000000000 +0200
      --- src/regexp_nfa.c 2013-06-17 21:27:03.000000000 +0200
      ***************
      *** 1150,1162 ****
      int n;

      /* \%[abc] */
      ! for (n = 0; (c = getchr()) != ']'; ++n)
      {
      if (c == NUL)
      EMSG2_RET_FAIL(_(e_missing_sb),
      reg_magic == MAGIC_ALL);
      ! EMIT(c);
      }
      if (n == 0)
      EMSG2_RET_FAIL(_(e_empty_sb),
      reg_magic == MAGIC_ALL);
      --- 1150,1165 ----
      int n;

      /* \%[abc] */
      ! for (n = 0; (c = peekchr()) != ']'; ++n)
      {
      if (c == NUL)
      EMSG2_RET_FAIL(_(e_missing_sb),
      reg_magic == MAGIC_ALL);
      ! /* recursive call! */
      ! if (nfa_regatom() == FAIL)
      ! return FAIL;
      }
      + getchr(); /* get the ] */
      if (n == 0)
      EMSG2_RET_FAIL(_(e_empty_sb),
      reg_magic == MAGIC_ALL);
      *** ../vim-7.3.1216/src/testdir/test64.in 2013-06-16 15:43:43.000000000 +0200
      --- src/testdir/test64.in 2013-06-17 21:21:35.000000000 +0200
      ***************
      *** 366,371 ****
      --- 366,372 ----
      :call add(tl, [2, '\%[bar]x', 'barxx', 'barx'])
      :call add(tl, [2, '\%[bar]x', 'bxx', 'bx'])
      :call add(tl, [2, '\%[bar]x', 'xxx', 'x'])
      + :call add(tl, [2, 'b\%[[ao]r]', 'bar bor', 'bar'])
      :"
      :"""" Alternatives, must use first longest match
      :call add(tl, [2, 'goo\|go', 'google', 'goo'])
      *** ../vim-7.3.1216/src/testdir/test64.ok 2013-06-16 15:43:43.000000000 +0200
      --- src/testdir/test64.ok 2013-06-17 21:27:09.000000000 +0200
      ***************
      *** 836,841 ****
      --- 836,844 ----
      OK 0 - \%[bar]x
      OK 1 - \%[bar]x
      OK 2 - \%[bar]x
      + OK 0 - b\%[[ao]r]
      + OK 1 - b\%[[ao]r]
      + OK 2 - b\%[[ao]r]
      OK 0 - goo\|go
      OK 1 - goo\|go
      OK 2 - goo\|go
      *** ../vim-7.3.1216/src/version.c 2013-06-17 20:27:13.000000000 +0200
      --- src/version.c 2013-06-17 21:20:10.000000000 +0200
      ***************
      *** 730,731 ****
      --- 730,733 ----
      { /* Add new patch number below this line */
      + /**/
      + 1217,
      /**/


      --
      Marriage isn't a word. It's a sentence.

      /// Bram Moolenaar -- Bram@... -- 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 ///

      --
      --
      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.
    Your message has been successfully submitted and would be delivered to recipients shortly.