[PATCH] fix (a|)* and friends
Paolo Bonzini
bonzini@gnu.org
Sat Dec 27 11:34:00 GMT 2003
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: regex-fix-opt-subexp.patch
Type: application/octet-stream
Size: 23257 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20031227/152c5a65/attachment.obj>
More information about the Libc-alpha
mailing list