This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fix (a|)* and friends


This patch is more complex than the old version because it handles inner
subexpressions like (a|())* where \2 must not be set.  The idea is to leave
empty subexpressions revertable until we are sure that they are valid -- in
this case, \2 will be reverted together with \1 as soon as the empty
occurrence of \1 is found.  On the contrary, for something like (a|()b)*, \2
will still be left revertable, but then it will always be accepted together
with \1 because the latter cannot be empty.

The patch includes fixes for the PCRE, BOOST and SPENCER test vectors as
well.  It also passes the new tests for a{0}{0} that Jakub introduced a few
days ago.

Paolo


Attachment: regex-fix-opt-subexp.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]