summaryrefslogtreecommitdiffstats
path: root/generic/regc_lex.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-06-17 19:30:25 (GMT)
committerstanton <stanton>1999-06-17 19:30:25 (GMT)
commit36fade5673a2b490fdbcdb5e782dcd8c906304d2 (patch)
tree12cb78e0f616e3bb360eafc126717bad52f22606 /generic/regc_lex.c
parente544512a2dd0604f3824a9f9532fe64b4d30606c (diff)
downloadtcl-36fade5673a2b490fdbcdb5e782dcd8c906304d2.zip
tcl-36fade5673a2b490fdbcdb5e782dcd8c906304d2.tar.gz
tcl-36fade5673a2b490fdbcdb5e782dcd8c906304d2.tar.bz2
* generic/regcomp.c: lint
* tests/reg.test: * generic/regex.h: * generic/regc_lex.c: Added REG_BOSONLY flag to allow Expect to iterate through a string an only find matches that start at the current position within the string.
Diffstat (limited to 'generic/regc_lex.c')
-rw-r--r--generic/regc_lex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/regc_lex.c b/generic/regc_lex.c
index d07fe72..e20b222 100644
--- a/generic/regc_lex.c
+++ b/generic/regc_lex.c
@@ -283,6 +283,12 @@ struct vars *v;
/* remember flavor of last token */
v->lasttype = v->nexttype;
+ /* REG_BOSONLY */
+ if (v->nexttype == EMPTY && (v->cflags&REG_BOSONLY)) {
+ /* at start of a REG_BOSONLY RE */
+ RETV(SBEGIN, 0); /* same as \A */
+ }
+
/* if we're nested and we've hit end, return to outer level */
if (v->savenow != NULL && ATEOS()) {
v->now = v->savenow;