|
Karsten Hopp |
d9a6c5 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
d9a6c5 |
Subject: Patch 7.3.1217
|
|
Karsten Hopp |
d9a6c5 |
Fcc: outbox
|
|
Karsten Hopp |
d9a6c5 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
d9a6c5 |
Mime-Version: 1.0
|
|
Karsten Hopp |
d9a6c5 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
d9a6c5 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
d9a6c5 |
------------
|
|
Karsten Hopp |
d9a6c5 |
|
|
Karsten Hopp |
d9a6c5 |
Patch 7.3.1217
|
|
Karsten Hopp |
d9a6c5 |
Problem: New regexp engine: Can't handle \%[[ao]]. (Yukihiro Nakadaira)
|
|
Karsten Hopp |
d9a6c5 |
Solution: Support nested atoms inside \%[].
|
|
Karsten Hopp |
d9a6c5 |
Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
|
|
Karsten Hopp |
d9a6c5 |
|
|
Karsten Hopp |
d9a6c5 |
|
|
Karsten Hopp |
d9a6c5 |
*** ../vim-7.3.1216/src/regexp_nfa.c 2013-06-16 22:49:09.000000000 +0200
|
|
Karsten Hopp |
d9a6c5 |
--- src/regexp_nfa.c 2013-06-17 21:27:03.000000000 +0200
|
|
Karsten Hopp |
d9a6c5 |
***************
|
|
Karsten Hopp |
d9a6c5 |
*** 1150,1162 ****
|
|
Karsten Hopp |
d9a6c5 |
int n;
|
|
Karsten Hopp |
d9a6c5 |
|
|
Karsten Hopp |
d9a6c5 |
/* \%[abc] */
|
|
Karsten Hopp |
d9a6c5 |
! for (n = 0; (c = getchr()) != ']'; ++n)
|
|
Karsten Hopp |
d9a6c5 |
{
|
|
Karsten Hopp |
d9a6c5 |
if (c == NUL)
|
|
Karsten Hopp |
d9a6c5 |
EMSG2_RET_FAIL(_(e_missing_sb),
|
|
Karsten Hopp |
d9a6c5 |
reg_magic == MAGIC_ALL);
|
|
Karsten Hopp |
d9a6c5 |
! EMIT(c);
|
|
Karsten Hopp |
d9a6c5 |
}
|
|
Karsten Hopp |
d9a6c5 |
if (n == 0)
|
|
Karsten Hopp |
d9a6c5 |
EMSG2_RET_FAIL(_(e_empty_sb),
|
|
Karsten Hopp |
d9a6c5 |
reg_magic == MAGIC_ALL);
|
|
Karsten Hopp |
d9a6c5 |
--- 1150,1165 ----
|
|
Karsten Hopp |
d9a6c5 |
int n;
|
|
Karsten Hopp |
d9a6c5 |
|
|
Karsten Hopp |
d9a6c5 |
/* \%[abc] */
|
|
Karsten Hopp |
d9a6c5 |
! for (n = 0; (c = peekchr()) != ']'; ++n)
|
|
Karsten Hopp |
d9a6c5 |
{
|
|
Karsten Hopp |
d9a6c5 |
if (c == NUL)
|
|
Karsten Hopp |
d9a6c5 |
EMSG2_RET_FAIL(_(e_missing_sb),
|
|
Karsten Hopp |
d9a6c5 |
reg_magic == MAGIC_ALL);
|
|
Karsten Hopp |
d9a6c5 |
! /* recursive call! */
|
|
Karsten Hopp |
d9a6c5 |
! if (nfa_regatom() == FAIL)
|
|
Karsten Hopp |
d9a6c5 |
! return FAIL;
|
|
Karsten Hopp |
d9a6c5 |
}
|
|
Karsten Hopp |
d9a6c5 |
+ getchr(); /* get the ] */
|
|
Karsten Hopp |
d9a6c5 |
if (n == 0)
|
|
Karsten Hopp |
d9a6c5 |
EMSG2_RET_FAIL(_(e_empty_sb),
|
|
Karsten Hopp |
d9a6c5 |
reg_magic == MAGIC_ALL);
|
|
Karsten Hopp |
d9a6c5 |
*** ../vim-7.3.1216/src/testdir/test64.in 2013-06-16 15:43:43.000000000 +0200
|
|
Karsten Hopp |
d9a6c5 |
--- src/testdir/test64.in 2013-06-17 21:21:35.000000000 +0200
|
|
Karsten Hopp |
d9a6c5 |
***************
|
|
Karsten Hopp |
d9a6c5 |
*** 366,371 ****
|
|
Karsten Hopp |
d9a6c5 |
--- 366,372 ----
|
|
Karsten Hopp |
d9a6c5 |
:call add(tl, [2, '\%[bar]x', 'barxx', 'barx'])
|
|
Karsten Hopp |
d9a6c5 |
:call add(tl, [2, '\%[bar]x', 'bxx', 'bx'])
|
|
Karsten Hopp |
d9a6c5 |
:call add(tl, [2, '\%[bar]x', 'xxx', 'x'])
|
|
Karsten Hopp |
d9a6c5 |
+ :call add(tl, [2, 'b\%[[ao]r]', 'bar bor', 'bar'])
|
|
Karsten Hopp |
d9a6c5 |
:"
|
|
Karsten Hopp |
d9a6c5 |
:"""" Alternatives, must use first longest match
|
|
Karsten Hopp |
d9a6c5 |
:call add(tl, [2, 'goo\|go', 'google', 'goo'])
|
|
Karsten Hopp |
d9a6c5 |
*** ../vim-7.3.1216/src/testdir/test64.ok 2013-06-16 15:43:43.000000000 +0200
|
|
Karsten Hopp |
d9a6c5 |
--- src/testdir/test64.ok 2013-06-17 21:27:09.000000000 +0200
|
|
Karsten Hopp |
d9a6c5 |
***************
|
|
Karsten Hopp |
d9a6c5 |
*** 836,841 ****
|
|
Karsten Hopp |
d9a6c5 |
--- 836,844 ----
|
|
Karsten Hopp |
d9a6c5 |
OK 0 - \%[bar]x
|
|
Karsten Hopp |
d9a6c5 |
OK 1 - \%[bar]x
|
|
Karsten Hopp |
d9a6c5 |
OK 2 - \%[bar]x
|
|
Karsten Hopp |
d9a6c5 |
+ OK 0 - b\%[[ao]r]
|
|
Karsten Hopp |
d9a6c5 |
+ OK 1 - b\%[[ao]r]
|
|
Karsten Hopp |
d9a6c5 |
+ OK 2 - b\%[[ao]r]
|
|
Karsten Hopp |
d9a6c5 |
OK 0 - goo\|go
|
|
Karsten Hopp |
d9a6c5 |
OK 1 - goo\|go
|
|
Karsten Hopp |
d9a6c5 |
OK 2 - goo\|go
|
|
Karsten Hopp |
d9a6c5 |
*** ../vim-7.3.1216/src/version.c 2013-06-17 20:27:13.000000000 +0200
|
|
Karsten Hopp |
d9a6c5 |
--- src/version.c 2013-06-17 21:20:10.000000000 +0200
|
|
Karsten Hopp |
d9a6c5 |
***************
|
|
Karsten Hopp |
d9a6c5 |
*** 730,731 ****
|
|
Karsten Hopp |
d9a6c5 |
--- 730,733 ----
|
|
Karsten Hopp |
d9a6c5 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
d9a6c5 |
+ /**/
|
|
Karsten Hopp |
d9a6c5 |
+ 1217,
|
|
Karsten Hopp |
d9a6c5 |
/**/
|
|
Karsten Hopp |
d9a6c5 |
|
|
Karsten Hopp |
d9a6c5 |
|
|
Karsten Hopp |
d9a6c5 |
--
|
|
Karsten Hopp |
d9a6c5 |
Marriage isn't a word. It's a sentence.
|
|
Karsten Hopp |
d9a6c5 |
|
|
Karsten Hopp |
d9a6c5 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
d9a6c5 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
d9a6c5 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
d9a6c5 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|