Mercurial > hg > octave-nkf > gnulib-hg
changeset 2537:c971620b680c
(at_begline_loc_p): Also recognize the \\(?:^ case
of an anchor at the beginning of a shy-group.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 25 May 2000 16:30:40 +0000 |
parents | 16fae460c29e |
children | dbfa917adef5 |
files | regex.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/regex.c +++ b/regex.c @@ -3208,7 +3208,12 @@ /* After a subexpression? */ (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash)) /* After an alternative? */ - || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash)); + || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash)) + /* After a shy subexpression? */ + || ((syntax & RE_SHY_GROUPS) && prev - 2 >= pattern + && prev[-1] == '?' && prev[-2] == '(' + && (syntax & RE_NO_BK_PARENS + || (prev - 3 >= pattern && prev[-3] == '\\'))); }