On 01/04/2012 03:59 AM, Paolo Bonzini wrote: > * NEWS: Document bugfix. > * src/dfa.c (insert, delete, merge): Do not merge nodes with the > same index and different constraints. > * tests/spencer1.tests: Add test cases. > --- > NEWS | 5 +++++ > src/dfa.c | 23 ++++++++++++----------- > tests/spencer1.tests | 12 ++++++++++++ > 3 files changed, 29 insertions(+), 11 deletions(-) > > diff --git a/NEWS b/NEWS > index 9efb82a..5467d37 100644 > --- a/NEWS > +++ b/NEWS > @@ -33,6 +33,11 @@ GNU grep NEWS -*- > outline -*- > grep no longer emits an error message and quits on MS-Windows when > invoked with the -r option. > > + grep interprets correctly some regular expressions where anchors > + (^, $, \<, \>, \B, \b) occur before an "|". For example "(^|\B)a" > + incorrectly reported a match the string "x a". > + [bug present since "the beginning"]
That has a grammar problem, and doesn't make it clear that the example is for egrep. Also, I like it when the first line can be read in isolation as a summary of the overall entry. How about: grep no longer misinterprets alternations involving anchors (^, $, \< \> \B, \b). For example, grep -E "(^|\B)a" no longer reports a match to the string "x a". [bug present since "the beginning"] > +++ b/tests/spencer1.tests > @@ -129,3 +129,15 @@ > 0@a(bc)d@abcd > 0@a[-]?c@ac > 0@(....).*\1@beriberi > +0@(^|\B)a@abc > +0@(^|\B)a@xyzabc > +1@(^|\B)a@xyz abc > +0@^a|\Ba@abc > +0@^a|\Ba@xyzabc > +1@^a|\Ba@xyz abc > +0@(^|\>)a@abc > +1@(^|\>)a@xyzabc > +1@(^|\>)a@xyz abc > +0@^a|\>a@abc > +1@^a|\>a@xyzabc > +1@^a|\>a@xyz abc Should we also test things like: 1@a($|\B)@a x -- Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
