static char_u *regprop __ARGS((char_u *));
#endif
+static int re_mult_next __ARGS((char *what));
+
static char_u e_missingbracket[] = N_("E769: Missing ] after %s[");
static char_u e_unmatchedpp[] = N_("E53: Unmatched %s%%(");
static char_u e_unmatchedp[] = N_("E54: Unmatched %s(");
#endif
case 's': ret = regnode(MOPEN + 0);
+ if (re_mult_next("\\zs") == FAIL)
+ return NULL;
break;
case 'e': ret = regnode(MCLOSE + 0);
+ if (re_mult_next("\\ze") == FAIL)
+ return NULL;
break;
default: EMSG_RET_NULL(_("E68: Invalid character after \\z"));
}
#endif /* DEBUG */
+/*
+ * Used in a place where no * or \+ can follow.
+ */
+ static int
+re_mult_next(what)
+ char *what;
+{
+ if (re_multi_type(peekchr()) == MULTI_MULT)
+ EMSG2_RET_FAIL(_("E888: (NFA regexp) cannot repeat %s"), what);
+ return OK;
+}
+
#ifdef FEAT_MBYTE
static void mb_decompose __ARGS((int c, int *c1, int *c2, int *c3));
static int nfa_regconcat __ARGS((void));
static int nfa_regbranch __ARGS((void));
static int nfa_reg __ARGS((int paren));
-static int re_mult_next __ARGS((char *what));
#ifdef DEBUG
static void nfa_set_code __ARGS((int c));
static void nfa_postfix_dump __ARGS((char_u *expr, int retval));
return OK;
}
-/*
- * Used in a place where no * or \+ can follow.
- */
- static int
-re_mult_next(what)
- char *what;
-{
- if (re_multi_type(peekchr()) == MULTI_MULT)
- EMSG2_RET_FAIL(_("E888: (NFA regexp) cannot repeat %s"), what);
- return OK;
-}
-
#ifdef DEBUG
static char_u code[50];