[PATCH] fix fall-out from Jakub's patches

Paolo Bonzini paolo.bonzini@polimi.it
Mon Dec 15 10:23:00 GMT 2003


This patch brings regex back to compile when !RE_ENABLE_I18N.

WRT the optional subexpressions, the second patch fixed the segmentation 
violation caused by the first alone; I simply had forgot a hunk.  
However running the glibc exposed further cases which need a more 
complicated approach.

In particular, consider a(b|((c)*))?d.  With my approach \1 and \3 are 
set correctly because they are repeated, but \2 is set wrong because it 
is not inside a repeated subexpression.  Avoiding all empty matches 
inside a repeated subexpression is blatantly wrong because of (Z())*.  
The right fix probably involves fiddling with the epsilon closure.

I have now embedded the glibc regex testsuite into the sed testsuite, 
which is going to help in doing my changes.

Thanks for accepting the patches,

Paolo
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: regex-fix-no-i18n.patch
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20031215/4cf2f1d1/attachment.ksh>


More information about the Libc-alpha mailing list