summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-05 16:51:57 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-05 16:51:57 +0200
commit67604aed755c71f51114c0125eb49ba7bcfcf8c7 (patch)
tree05e5bdaa2c2bb8f16403733445d6c752fd5490d6
parent5b84ddcceae72c14c3f608006d305f9a8e00fefc (diff)
downloadvim-git-7.3.1121.tar.gz
updated for version 7.3.1121v7.3.1121
Problem: New regexp engine: adding states that are not used. Solution: Don't add the states.
-rw-r--r--src/regexp_nfa.c16
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 12 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 5873cfcc1..c7747eac3 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -3169,6 +3169,7 @@ addstate(l, state, subs, off)
case NFA_SPLIT:
case NFA_NOT:
case NFA_NOPEN:
+ case NFA_SKIP_CHAR:
case NFA_NCLOSE:
case NFA_MCLOSE:
case NFA_MCLOSE1:
@@ -3192,6 +3193,7 @@ addstate(l, state, subs, off)
case NFA_ZCLOSE8:
case NFA_ZCLOSE9:
#endif
+ case NFA_ZEND:
/* These nodes are not added themselves but their "out" and/or
* "out1" may be added below. */
break;
@@ -3218,6 +3220,7 @@ addstate(l, state, subs, off)
case NFA_ZOPEN8:
case NFA_ZOPEN9:
#endif
+ case NFA_ZSTART:
/* These nodes do not need to be added, but we need to bail out
* when it was tried to be added to this list before. */
if (state->lastlist[nfa_ll_index] == l->id)
@@ -4362,10 +4365,6 @@ nfa_regmatch(prog, start, submatch, m)
case NFA_START_INVISIBLE:
case NFA_START_INVISIBLE_BEFORE:
- /* If invisible match has a higher chance to fail, do it
- * right away. Otherwise postpone it until what follows is
- * matching and causes addstate(nextlist, ..) to be called.
- * This is indicated by the "pim" field. */
{
nfa_pim_T *pim;
int cout = t->state->out1->out->c;
@@ -4863,12 +4862,11 @@ nfa_regmatch(prog, start, submatch, m)
log_subsexpr(&nextlist->t[nextlist->n - 1].subs);
#endif
}
-
}
break;
}
case NFA_SKIP:
- /* charater of previous matching \1 .. \9 */
+ /* character of previous matching \1 .. \9 or \@> */
if (t->count - clen <= 0)
{
/* end of match, go to what follows */
@@ -4892,12 +4890,6 @@ nfa_regmatch(prog, start, submatch, m)
}
break;
- case NFA_SKIP_CHAR:
- case NFA_ZSTART:
- case NFA_ZEND:
- /* TODO: should not happen? */
- break;
-
case NFA_LNUM:
case NFA_LNUM_GT:
case NFA_LNUM_LT:
diff --git a/src/version.c b/src/version.c
index f6585e1f2..e74e271da 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1121,
+/**/
1120,
/**/
1119,