New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tk broken by regexp fail #973
Comments
From nick@ni-s.u-net.comThis is failing on just-built 5.005_63 print "\$0 is '$0'\n"; $name = $1 if (( print "'$1'\n"; It prints Note that this is with multiplicity _ON_ Perl Info
|
From [Unknown Contact. See original ticket]Nick Ing-Simmons writes:
This is not fixed by the patch I sent out recently. Here is the ./perl -e '"ab" =~ /(^|a)b/ or die' Compiling REx `(^|a)b' Note that stclass is [b], not [ab] as it should have been. Ilya |
From [Unknown Contact. See original ticket]Ilya Zakharevich <ilya@math.ohio-state.edu> writes:
So I discovered having applied the patch full of hope :-(
|
From [Unknown Contact. See original ticket]Nick Ing-Simmons writes:
This should help: Inline Patch--- ./t/op/re_tests-pre Fri Dec 24 15:24:05 1999
+++ ./t/op/re_tests Tue Dec 21 19:36:10 1999
@@ -749,3 +749,4 @@ tt+$ xxxtt y - -
'(\.c(pp|xx|c)?$)'i IO.c y $1 .c
^([a-z]:) C:/ n - -
'^\S\s+aa$'m \nx aa y - -
+(^|a)b ab y - -
--- ./regcomp.c-pre Fri Dec 24 15:23:30 1999
+++ ./regcomp.c Fri Dec 24 15:42:14 1999
@@ -545,9 +545,21 @@ S_study_chunk(pTHX_ regnode **scanp, I32
}
}
else if (flags & SCF_DO_STCLASS_AND) {
- cl_and(data->start_class, &accum);
- if (min1)
+ if (min1) {
+ cl_and(data->start_class, &accum);
flags &= ~SCF_DO_STCLASS;
+ }
+ else {
+ /* Switch to OR mode: cache the old value of
+ * data->start_class */
+ StructCopy(data->start_class, &and_with,
+ struct regnode_charclass_class);
+ flags &= ~SCF_DO_STCLASS_AND;
+ StructCopy(&accum, data->start_class,
+ struct regnode_charclass_class);
+ flags |= SCF_DO_STCLASS_OR;
+ data->start_class->flags |= ANYOF_EOS;
+ }
}
}
else if (code == BRANCHJ) /* single branch is optimized. */ |
Migrated from rt.perl.org#1920 (status was 'resolved')
Searchable as RT1920$
The text was updated successfully, but these errors were encountered: