|
Karsten Hopp |
5629fc |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
5629fc |
Subject: Patch 7.4.001
|
|
Karsten Hopp |
5629fc |
Fcc: outbox
|
|
Karsten Hopp |
5629fc |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
5629fc |
Mime-Version: 1.0
|
|
Karsten Hopp |
5629fc |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
5629fc |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
5629fc |
------------
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
Patch 7.4.001
|
|
Karsten Hopp |
5629fc |
Problem: Character classes such as [a-z] to not react to 'ignorecase'.
|
|
Karsten Hopp |
5629fc |
Breaks man page highlighting. (Mario Grgic)
|
|
Karsten Hopp |
5629fc |
Solution: Add separate items for classes that react to 'ignorecase'. Clean
|
|
Karsten Hopp |
5629fc |
up logic handling character classes. Add more tests.
|
|
Karsten Hopp |
5629fc |
Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
*** ../vim-7.4.000/src/regexp_nfa.c 2013-08-01 18:27:51.000000000 +0200
|
|
Karsten Hopp |
5629fc |
--- src/regexp_nfa.c 2013-08-14 11:49:50.000000000 +0200
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 29,34 ****
|
|
Karsten Hopp |
5629fc |
--- 29,37 ----
|
|
Karsten Hopp |
5629fc |
# define NFA_REGEXP_DEBUG_LOG "nfa_regexp_debug.log"
|
|
Karsten Hopp |
5629fc |
#endif
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
+ /* Added to NFA_ANY - NFA_NUPPER_IC to include a NL. */
|
|
Karsten Hopp |
5629fc |
+ #define NFA_ADD_NL 31
|
|
Karsten Hopp |
5629fc |
+
|
|
Karsten Hopp |
5629fc |
enum
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
NFA_SPLIT = -1024,
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 183,188 ****
|
|
Karsten Hopp |
5629fc |
--- 186,198 ----
|
|
Karsten Hopp |
5629fc |
NFA_NLOWER, /* Match non-lowercase char */
|
|
Karsten Hopp |
5629fc |
NFA_UPPER, /* Match uppercase char */
|
|
Karsten Hopp |
5629fc |
NFA_NUPPER, /* Match non-uppercase char */
|
|
Karsten Hopp |
5629fc |
+ NFA_LOWER_IC, /* Match [a-z] */
|
|
Karsten Hopp |
5629fc |
+ NFA_NLOWER_IC, /* Match [^a-z] */
|
|
Karsten Hopp |
5629fc |
+ NFA_UPPER_IC, /* Match [A-Z] */
|
|
Karsten Hopp |
5629fc |
+ NFA_NUPPER_IC, /* Match [^A-Z] */
|
|
Karsten Hopp |
5629fc |
+
|
|
Karsten Hopp |
5629fc |
+ NFA_FIRST_NL = NFA_ANY + NFA_ADD_NL,
|
|
Karsten Hopp |
5629fc |
+ NFA_LAST_NL = NFA_NUPPER_IC + NFA_ADD_NL,
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
NFA_CURSOR, /* Match cursor pos */
|
|
Karsten Hopp |
5629fc |
NFA_LNUM, /* Match line number */
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 199,207 ****
|
|
Karsten Hopp |
5629fc |
NFA_MARK_LT, /* Match < mark */
|
|
Karsten Hopp |
5629fc |
NFA_VISUAL, /* Match Visual area */
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
- NFA_FIRST_NL = NFA_ANY + ADD_NL,
|
|
Karsten Hopp |
5629fc |
- NFA_LAST_NL = NFA_NUPPER + ADD_NL,
|
|
Karsten Hopp |
5629fc |
-
|
|
Karsten Hopp |
5629fc |
/* Character classes [:alnum:] etc */
|
|
Karsten Hopp |
5629fc |
NFA_CLASS_ALNUM,
|
|
Karsten Hopp |
5629fc |
NFA_CLASS_ALPHA,
|
|
Karsten Hopp |
5629fc |
--- 209,214 ----
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 578,583 ****
|
|
Karsten Hopp |
5629fc |
--- 585,592 ----
|
|
Karsten Hopp |
5629fc |
* On failure, return 0 (=FAIL)
|
|
Karsten Hopp |
5629fc |
* Start points to the first char of the range, while end should point
|
|
Karsten Hopp |
5629fc |
* to the closing brace.
|
|
Karsten Hopp |
5629fc |
+ * Keep in mind that 'ignorecase' applies at execution time, thus [a-z] may
|
|
Karsten Hopp |
5629fc |
+ * need to be interpreted as [a-zA-Z].
|
|
Karsten Hopp |
5629fc |
*/
|
|
Karsten Hopp |
5629fc |
static int
|
|
Karsten Hopp |
5629fc |
nfa_recognize_char_class(start, end, extra_newl)
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 681,687 ****
|
|
Karsten Hopp |
5629fc |
return FAIL;
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
if (newl == TRUE)
|
|
Karsten Hopp |
5629fc |
! extra_newl = ADD_NL;
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
switch (config)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
--- 690,696 ----
|
|
Karsten Hopp |
5629fc |
return FAIL;
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
if (newl == TRUE)
|
|
Karsten Hopp |
5629fc |
! extra_newl = NFA_ADD_NL;
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
switch (config)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 710,722 ****
|
|
Karsten Hopp |
5629fc |
case CLASS_not | CLASS_az | CLASS_AZ:
|
|
Karsten Hopp |
5629fc |
return extra_newl + NFA_NALPHA;
|
|
Karsten Hopp |
5629fc |
case CLASS_az:
|
|
Karsten Hopp |
5629fc |
! return extra_newl + NFA_LOWER;
|
|
Karsten Hopp |
5629fc |
case CLASS_not | CLASS_az:
|
|
Karsten Hopp |
5629fc |
! return extra_newl + NFA_NLOWER;
|
|
Karsten Hopp |
5629fc |
case CLASS_AZ:
|
|
Karsten Hopp |
5629fc |
! return extra_newl + NFA_UPPER;
|
|
Karsten Hopp |
5629fc |
case CLASS_not | CLASS_AZ:
|
|
Karsten Hopp |
5629fc |
! return extra_newl + NFA_NUPPER;
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
return FAIL;
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
--- 719,731 ----
|
|
Karsten Hopp |
5629fc |
case CLASS_not | CLASS_az | CLASS_AZ:
|
|
Karsten Hopp |
5629fc |
return extra_newl + NFA_NALPHA;
|
|
Karsten Hopp |
5629fc |
case CLASS_az:
|
|
Karsten Hopp |
5629fc |
! return extra_newl + NFA_LOWER_IC;
|
|
Karsten Hopp |
5629fc |
case CLASS_not | CLASS_az:
|
|
Karsten Hopp |
5629fc |
! return extra_newl + NFA_NLOWER_IC;
|
|
Karsten Hopp |
5629fc |
case CLASS_AZ:
|
|
Karsten Hopp |
5629fc |
! return extra_newl + NFA_UPPER_IC;
|
|
Karsten Hopp |
5629fc |
case CLASS_not | CLASS_AZ:
|
|
Karsten Hopp |
5629fc |
! return extra_newl + NFA_NUPPER_IC;
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
return FAIL;
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 914,920 ****
|
|
Karsten Hopp |
5629fc |
break;
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
! extra = ADD_NL;
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
/* "\_[" is collection plus newline */
|
|
Karsten Hopp |
5629fc |
if (c == '[')
|
|
Karsten Hopp |
5629fc |
--- 923,929 ----
|
|
Karsten Hopp |
5629fc |
break;
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
! extra = NFA_ADD_NL;
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
/* "\_[" is collection plus newline */
|
|
Karsten Hopp |
5629fc |
if (c == '[')
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 970,976 ****
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
#endif
|
|
Karsten Hopp |
5629fc |
EMIT(nfa_classcodes[p - classchars]);
|
|
Karsten Hopp |
5629fc |
! if (extra == ADD_NL)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_NEWL);
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_OR);
|
|
Karsten Hopp |
5629fc |
--- 979,985 ----
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
#endif
|
|
Karsten Hopp |
5629fc |
EMIT(nfa_classcodes[p - classchars]);
|
|
Karsten Hopp |
5629fc |
! if (extra == NFA_ADD_NL)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_NEWL);
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_OR);
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 1240,1260 ****
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
/*
|
|
Karsten Hopp |
5629fc |
* Try to reverse engineer character classes. For example,
|
|
Karsten Hopp |
5629fc |
! * recognize that [0-9] stands for \d and [A-Za-z_] with \h,
|
|
Karsten Hopp |
5629fc |
* and perform the necessary substitutions in the NFA.
|
|
Karsten Hopp |
5629fc |
*/
|
|
Karsten Hopp |
5629fc |
result = nfa_recognize_char_class(regparse, endp,
|
|
Karsten Hopp |
5629fc |
! extra == ADD_NL);
|
|
Karsten Hopp |
5629fc |
if (result != FAIL)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
! if (result >= NFA_DIGIT && result <= NFA_NUPPER)
|
|
Karsten Hopp |
5629fc |
! EMIT(result);
|
|
Karsten Hopp |
5629fc |
! else /* must be char class + newline */
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
! EMIT(result - ADD_NL);
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_NEWL);
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_OR);
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
regparse = endp;
|
|
Karsten Hopp |
5629fc |
mb_ptr_adv(regparse);
|
|
Karsten Hopp |
5629fc |
return OK;
|
|
Karsten Hopp |
5629fc |
--- 1249,1269 ----
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
/*
|
|
Karsten Hopp |
5629fc |
* Try to reverse engineer character classes. For example,
|
|
Karsten Hopp |
5629fc |
! * recognize that [0-9] stands for \d and [A-Za-z_] for \h,
|
|
Karsten Hopp |
5629fc |
* and perform the necessary substitutions in the NFA.
|
|
Karsten Hopp |
5629fc |
*/
|
|
Karsten Hopp |
5629fc |
result = nfa_recognize_char_class(regparse, endp,
|
|
Karsten Hopp |
5629fc |
! extra == NFA_ADD_NL);
|
|
Karsten Hopp |
5629fc |
if (result != FAIL)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
! if (result >= NFA_FIRST_NL && result <= NFA_LAST_NL)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
! EMIT(result - NFA_ADD_NL);
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_NEWL);
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_OR);
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
+ else
|
|
Karsten Hopp |
5629fc |
+ EMIT(result);
|
|
Karsten Hopp |
5629fc |
regparse = endp;
|
|
Karsten Hopp |
5629fc |
mb_ptr_adv(regparse);
|
|
Karsten Hopp |
5629fc |
return OK;
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 1504,1510 ****
|
|
Karsten Hopp |
5629fc |
* collection, add an OR below. But not for negated
|
|
Karsten Hopp |
5629fc |
* range. */
|
|
Karsten Hopp |
5629fc |
if (!negated)
|
|
Karsten Hopp |
5629fc |
! extra = ADD_NL;
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
else
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
--- 1513,1519 ----
|
|
Karsten Hopp |
5629fc |
* collection, add an OR below. But not for negated
|
|
Karsten Hopp |
5629fc |
* range. */
|
|
Karsten Hopp |
5629fc |
if (!negated)
|
|
Karsten Hopp |
5629fc |
! extra = NFA_ADD_NL;
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
else
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 1537,1543 ****
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_END_COLL);
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
/* \_[] also matches \n but it's not negated */
|
|
Karsten Hopp |
5629fc |
! if (extra == ADD_NL)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
EMIT(reg_string ? NL : NFA_NEWL);
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_OR);
|
|
Karsten Hopp |
5629fc |
--- 1546,1552 ----
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_END_COLL);
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
/* \_[] also matches \n but it's not negated */
|
|
Karsten Hopp |
5629fc |
! if (extra == NFA_ADD_NL)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
EMIT(reg_string ? NL : NFA_NEWL);
|
|
Karsten Hopp |
5629fc |
EMIT(NFA_OR);
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 2011,2017 ****
|
|
Karsten Hopp |
5629fc |
if (c >= NFA_FIRST_NL && c <= NFA_LAST_NL)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
addnl = TRUE;
|
|
Karsten Hopp |
5629fc |
! c -= ADD_NL;
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
STRCPY(code, "");
|
|
Karsten Hopp |
5629fc |
--- 2020,2026 ----
|
|
Karsten Hopp |
5629fc |
if (c >= NFA_FIRST_NL && c <= NFA_LAST_NL)
|
|
Karsten Hopp |
5629fc |
{
|
|
Karsten Hopp |
5629fc |
addnl = TRUE;
|
|
Karsten Hopp |
5629fc |
! c -= NFA_ADD_NL;
|
|
Karsten Hopp |
5629fc |
}
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
STRCPY(code, "");
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 2217,2222 ****
|
|
Karsten Hopp |
5629fc |
--- 2226,2235 ----
|
|
Karsten Hopp |
5629fc |
case NFA_NLOWER:STRCPY(code, "NFA_NLOWER"); break;
|
|
Karsten Hopp |
5629fc |
case NFA_UPPER: STRCPY(code, "NFA_UPPER"); break;
|
|
Karsten Hopp |
5629fc |
case NFA_NUPPER:STRCPY(code, "NFA_NUPPER"); break;
|
|
Karsten Hopp |
5629fc |
+ case NFA_LOWER_IC: STRCPY(code, "NFA_LOWER_IC"); break;
|
|
Karsten Hopp |
5629fc |
+ case NFA_NLOWER_IC: STRCPY(code, "NFA_NLOWER_IC"); break;
|
|
Karsten Hopp |
5629fc |
+ case NFA_UPPER_IC: STRCPY(code, "NFA_UPPER_IC"); break;
|
|
Karsten Hopp |
5629fc |
+ case NFA_NUPPER_IC: STRCPY(code, "NFA_NUPPER_IC"); break;
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
default:
|
|
Karsten Hopp |
5629fc |
STRCPY(code, "CHAR(x)");
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 2687,2692 ****
|
|
Karsten Hopp |
5629fc |
--- 2700,2709 ----
|
|
Karsten Hopp |
5629fc |
case NFA_NLOWER:
|
|
Karsten Hopp |
5629fc |
case NFA_UPPER:
|
|
Karsten Hopp |
5629fc |
case NFA_NUPPER:
|
|
Karsten Hopp |
5629fc |
+ case NFA_LOWER_IC:
|
|
Karsten Hopp |
5629fc |
+ case NFA_NLOWER_IC:
|
|
Karsten Hopp |
5629fc |
+ case NFA_UPPER_IC:
|
|
Karsten Hopp |
5629fc |
+ case NFA_NUPPER_IC:
|
|
Karsten Hopp |
5629fc |
/* possibly non-ascii */
|
|
Karsten Hopp |
5629fc |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
5629fc |
if (has_mbyte)
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 3841,3846 ****
|
|
Karsten Hopp |
5629fc |
--- 3858,3867 ----
|
|
Karsten Hopp |
5629fc |
case NFA_NLOWER:
|
|
Karsten Hopp |
5629fc |
case NFA_UPPER:
|
|
Karsten Hopp |
5629fc |
case NFA_NUPPER:
|
|
Karsten Hopp |
5629fc |
+ case NFA_LOWER_IC:
|
|
Karsten Hopp |
5629fc |
+ case NFA_NLOWER_IC:
|
|
Karsten Hopp |
5629fc |
+ case NFA_UPPER_IC:
|
|
Karsten Hopp |
5629fc |
+ case NFA_NUPPER_IC:
|
|
Karsten Hopp |
5629fc |
case NFA_START_COLL:
|
|
Karsten Hopp |
5629fc |
case NFA_START_NEG_COLL:
|
|
Karsten Hopp |
5629fc |
case NFA_NEWL:
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 5872,5877 ****
|
|
Karsten Hopp |
5629fc |
--- 5893,5920 ----
|
|
Karsten Hopp |
5629fc |
ADD_STATE_IF_MATCH(t->state);
|
|
Karsten Hopp |
5629fc |
break;
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
+ case NFA_LOWER_IC: /* [a-z] */
|
|
Karsten Hopp |
5629fc |
+ result = ri_lower(curc) || (ireg_ic && ri_upper(curc));
|
|
Karsten Hopp |
5629fc |
+ ADD_STATE_IF_MATCH(t->state);
|
|
Karsten Hopp |
5629fc |
+ break;
|
|
Karsten Hopp |
5629fc |
+
|
|
Karsten Hopp |
5629fc |
+ case NFA_NLOWER_IC: /* [^a-z] */
|
|
Karsten Hopp |
5629fc |
+ result = curc != NUL
|
|
Karsten Hopp |
5629fc |
+ && !(ri_lower(curc) || (ireg_ic && ri_upper(curc)));
|
|
Karsten Hopp |
5629fc |
+ ADD_STATE_IF_MATCH(t->state);
|
|
Karsten Hopp |
5629fc |
+ break;
|
|
Karsten Hopp |
5629fc |
+
|
|
Karsten Hopp |
5629fc |
+ case NFA_UPPER_IC: /* [A-Z] */
|
|
Karsten Hopp |
5629fc |
+ result = ri_upper(curc) || (ireg_ic && ri_lower(curc));
|
|
Karsten Hopp |
5629fc |
+ ADD_STATE_IF_MATCH(t->state);
|
|
Karsten Hopp |
5629fc |
+ break;
|
|
Karsten Hopp |
5629fc |
+
|
|
Karsten Hopp |
5629fc |
+ case NFA_NUPPER_IC: /* ^[A-Z] */
|
|
Karsten Hopp |
5629fc |
+ result = curc != NUL
|
|
Karsten Hopp |
5629fc |
+ && !(ri_upper(curc) || (ireg_ic && ri_lower(curc)));
|
|
Karsten Hopp |
5629fc |
+ ADD_STATE_IF_MATCH(t->state);
|
|
Karsten Hopp |
5629fc |
+ break;
|
|
Karsten Hopp |
5629fc |
+
|
|
Karsten Hopp |
5629fc |
case NFA_BACKREF1:
|
|
Karsten Hopp |
5629fc |
case NFA_BACKREF2:
|
|
Karsten Hopp |
5629fc |
case NFA_BACKREF3:
|
|
Karsten Hopp |
5629fc |
*** ../vim-7.4.000/src/testdir/test64.in 2013-08-01 17:45:33.000000000 +0200
|
|
Karsten Hopp |
5629fc |
--- src/testdir/test64.in 2013-08-14 11:50:11.000000000 +0200
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 289,303 ****
|
|
Karsten Hopp |
5629fc |
:call add(tl, [2, '.a\%$', " a\n "])
|
|
Karsten Hopp |
5629fc |
:call add(tl, [2, '.a\%$', " a\n_a", "_a"])
|
|
Karsten Hopp |
5629fc |
:"
|
|
Karsten Hopp |
5629fc |
! :"""" Test recognition of some character classes
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[0-9]', '8', '8'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^0-9]', '8'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[0-9a-fA-F]*', '0a7', '0a7'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^0-9A-Fa-f]\+', '0a7'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[a-z_A-Z0-9]\+', 'aso_sfoij', 'aso_sfoij'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[a-z]', 'a', 'a'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[a-zA-Z]', 'a', 'a'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[A-Z]', 'a'])
|
|
Karsten Hopp |
5629fc |
:call add(tl, [2, '\C[^A-Z]\+', 'ABCOIJDEOIFNSD jsfoij sa', ' jsfoij sa'])
|
|
Karsten Hopp |
5629fc |
:"
|
|
Karsten Hopp |
5629fc |
:"""" Tests for \z features
|
|
Karsten Hopp |
5629fc |
--- 289,317 ----
|
|
Karsten Hopp |
5629fc |
:call add(tl, [2, '.a\%$', " a\n "])
|
|
Karsten Hopp |
5629fc |
:call add(tl, [2, '.a\%$', " a\n_a", "_a"])
|
|
Karsten Hopp |
5629fc |
:"
|
|
Karsten Hopp |
5629fc |
! :"""" Test recognition of character classes
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[0-7]\+', 'x0123456789x', '01234567'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^0-7]\+', '0a;X+% 897', 'a;X+% 89'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[0-9]\+', 'x0123456789x', '0123456789'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^0-9]\+', '0a;X+% 9', 'a;X+% '])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[0-9a-fA-F]\+', 'x0189abcdefg', '0189abcdef'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^0-9A-Fa-f]\+', '0189g;X+% ab', 'g;X+% '])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[a-z_A-Z0-9]\+', ';+aso_SfOij ', 'aso_SfOij'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^a-z_A-Z0-9]\+', 'aSo_;+% sfOij', ';+% '])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[a-z_A-Z]\+', '0abyz_ABYZ;', 'abyz_ABYZ'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^a-z_A-Z]\+', 'abAB_09;+% yzYZ', '09;+% '])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[a-z]\+', '0abcxyz1', 'abcxyz'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[a-z]\+', 'AabxyzZ', 'abxyz'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^a-z]\+', 'a;X09+% x', ';X09+% '])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^a-z]\+', 'abX0;%yz', 'X0;%'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[a-zA-Z]\+', '0abABxzXZ9', 'abABxzXZ'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^a-zA-Z]\+', 'ab09_;+ XZ', '09_;+ '])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[A-Z]\+', 'aABXYZz', 'ABXYZ'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[^A-Z]\+', 'ABx0;%YZ', 'x0;%'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[a-z]\+\c', '0abxyzABXYZ;', 'abxyzABXYZ'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '[A-Z]\+\c', '0abABxzXZ9', 'abABxzXZ'])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '\c[^a-z]\+', 'ab09_;+ XZ', '09_;+ '])
|
|
Karsten Hopp |
5629fc |
! :call add(tl, [2, '\c[^A-Z]\+', 'ab09_;+ XZ', '09_;+ '])
|
|
Karsten Hopp |
5629fc |
:call add(tl, [2, '\C[^A-Z]\+', 'ABCOIJDEOIFNSD jsfoij sa', ' jsfoij sa'])
|
|
Karsten Hopp |
5629fc |
:"
|
|
Karsten Hopp |
5629fc |
:"""" Tests for \z features
|
|
Karsten Hopp |
5629fc |
*** ../vim-7.4.000/src/testdir/test64.ok 2013-08-01 18:28:56.000000000 +0200
|
|
Karsten Hopp |
5629fc |
--- src/testdir/test64.ok 2013-08-14 11:50:37.000000000 +0200
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 650,679 ****
|
|
Karsten Hopp |
5629fc |
OK 0 - .a\%$
|
|
Karsten Hopp |
5629fc |
OK 1 - .a\%$
|
|
Karsten Hopp |
5629fc |
OK 2 - .a\%$
|
|
Karsten Hopp |
5629fc |
! OK 0 - [0-9]
|
|
Karsten Hopp |
5629fc |
! OK 1 - [0-9]
|
|
Karsten Hopp |
5629fc |
! OK 2 - [0-9]
|
|
Karsten Hopp |
5629fc |
! OK 0 - [^0-9]
|
|
Karsten Hopp |
5629fc |
! OK 1 - [^0-9]
|
|
Karsten Hopp |
5629fc |
! OK 2 - [^0-9]
|
|
Karsten Hopp |
5629fc |
! OK 0 - [0-9a-fA-F]*
|
|
Karsten Hopp |
5629fc |
! OK 1 - [0-9a-fA-F]*
|
|
Karsten Hopp |
5629fc |
! OK 2 - [0-9a-fA-F]*
|
|
Karsten Hopp |
5629fc |
OK 0 - [^0-9A-Fa-f]\+
|
|
Karsten Hopp |
5629fc |
OK 1 - [^0-9A-Fa-f]\+
|
|
Karsten Hopp |
5629fc |
OK 2 - [^0-9A-Fa-f]\+
|
|
Karsten Hopp |
5629fc |
OK 0 - [a-z_A-Z0-9]\+
|
|
Karsten Hopp |
5629fc |
OK 1 - [a-z_A-Z0-9]\+
|
|
Karsten Hopp |
5629fc |
OK 2 - [a-z_A-Z0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [a-z]
|
|
Karsten Hopp |
5629fc |
! OK 1 - [a-z]
|
|
Karsten Hopp |
5629fc |
! OK 2 - [a-z]
|
|
Karsten Hopp |
5629fc |
! OK 0 - [a-zA-Z]
|
|
Karsten Hopp |
5629fc |
! OK 1 - [a-zA-Z]
|
|
Karsten Hopp |
5629fc |
! OK 2 - [a-zA-Z]
|
|
Karsten Hopp |
5629fc |
! OK 0 - [A-Z]
|
|
Karsten Hopp |
5629fc |
! OK 1 - [A-Z]
|
|
Karsten Hopp |
5629fc |
! OK 2 - [A-Z]
|
|
Karsten Hopp |
5629fc |
OK 0 - \C[^A-Z]\+
|
|
Karsten Hopp |
5629fc |
OK 1 - \C[^A-Z]\+
|
|
Karsten Hopp |
5629fc |
OK 2 - \C[^A-Z]\+
|
|
Karsten Hopp |
5629fc |
--- 650,721 ----
|
|
Karsten Hopp |
5629fc |
OK 0 - .a\%$
|
|
Karsten Hopp |
5629fc |
OK 1 - .a\%$
|
|
Karsten Hopp |
5629fc |
OK 2 - .a\%$
|
|
Karsten Hopp |
5629fc |
! OK 0 - [0-7]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [0-7]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [0-7]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [^0-7]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [^0-7]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [^0-7]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [^0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [^0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [^0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [0-9a-fA-F]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [0-9a-fA-F]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [0-9a-fA-F]\+
|
|
Karsten Hopp |
5629fc |
OK 0 - [^0-9A-Fa-f]\+
|
|
Karsten Hopp |
5629fc |
OK 1 - [^0-9A-Fa-f]\+
|
|
Karsten Hopp |
5629fc |
OK 2 - [^0-9A-Fa-f]\+
|
|
Karsten Hopp |
5629fc |
OK 0 - [a-z_A-Z0-9]\+
|
|
Karsten Hopp |
5629fc |
OK 1 - [a-z_A-Z0-9]\+
|
|
Karsten Hopp |
5629fc |
OK 2 - [a-z_A-Z0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [^a-z_A-Z0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [^a-z_A-Z0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [^a-z_A-Z0-9]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [a-z_A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [a-z_A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [a-z_A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [^a-z_A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [^a-z_A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [^a-z_A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [^a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [^a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [^a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [^a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [^a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [^a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [a-zA-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [a-zA-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [a-zA-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [^a-zA-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [^a-zA-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [^a-zA-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [^A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - [^A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - [^A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - [a-z]\+\c
|
|
Karsten Hopp |
5629fc |
! OK 1 - [a-z]\+\c
|
|
Karsten Hopp |
5629fc |
! OK 2 - [a-z]\+\c
|
|
Karsten Hopp |
5629fc |
! OK 0 - [A-Z]\+\c
|
|
Karsten Hopp |
5629fc |
! OK 1 - [A-Z]\+\c
|
|
Karsten Hopp |
5629fc |
! OK 2 - [A-Z]\+\c
|
|
Karsten Hopp |
5629fc |
! OK 0 - \c[^a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - \c[^a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - \c[^a-z]\+
|
|
Karsten Hopp |
5629fc |
! OK 0 - \c[^A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 1 - \c[^A-Z]\+
|
|
Karsten Hopp |
5629fc |
! OK 2 - \c[^A-Z]\+
|
|
Karsten Hopp |
5629fc |
OK 0 - \C[^A-Z]\+
|
|
Karsten Hopp |
5629fc |
OK 1 - \C[^A-Z]\+
|
|
Karsten Hopp |
5629fc |
OK 2 - \C[^A-Z]\+
|
|
Karsten Hopp |
5629fc |
*** ../vim-7.4.000/src/version.c 2013-08-10 13:29:20.000000000 +0200
|
|
Karsten Hopp |
5629fc |
--- src/version.c 2013-08-14 11:54:57.000000000 +0200
|
|
Karsten Hopp |
5629fc |
***************
|
|
Karsten Hopp |
5629fc |
*** 729,730 ****
|
|
Karsten Hopp |
5629fc |
--- 729,732 ----
|
|
Karsten Hopp |
5629fc |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
5629fc |
+ /**/
|
|
Karsten Hopp |
5629fc |
+ 1,
|
|
Karsten Hopp |
5629fc |
/**/
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
--
|
|
Karsten Hopp |
5629fc |
How many light bulbs does it take to change a person?
|
|
Karsten Hopp |
5629fc |
|
|
Karsten Hopp |
5629fc |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
5629fc |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
5629fc |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
5629fc |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|