[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] dfa: fix {0,0}
From: |
Jim Meyering |
Subject: |
Re: [PATCH 2/3] dfa: fix {0,0} |
Date: |
Sat, 17 Apr 2010 09:40:40 +0200 |
Paolo Bonzini wrote:
> * NEWS: Document change.
> * src/dfa.c (struct dfa): Remove "broken" field.
> (lex): Do not set it.
> (closure): On {0,0}, backup and lex another closure without
> adding a CAT.
> (dfabroken): Remove.
> * src/dfa.h (dfabroken): Remove.
> * tests/spencer1.tests: Add testcases for {m,n}.
> ---
> NEWS | 2 ++
> src/dfa.c | 22 +++++++---------------
> src/dfa.h | 6 ------
> tests/spencer1.tests | 9 +++++++++
> 4 files changed, 18 insertions(+), 21 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index a9ee5c0..bcca373 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -7,6 +7,8 @@ GNU grep NEWS -*- outline
> -*-
> Searching with grep -Fw for an empty string would not match an
> empty line. [bug present since "the beginning"]
>
> + X{0,0} is implemented correctly. It used to be a synonym of X{0,1}.
> + [bug present since "the beginning"]
Thanks for fixing that!
Nice, small and simple-looking patch (appearances can be deceiving ;-).
One nit: this NEWS patch does not apply yet, since afaik,
you haven't posted the grep -Fw patch mentioned above.
Oh! I see you've pushed it already.
Please post patches to this list, too.
I know your added tests exercise this, but I confirmed manually, too:
$ echo bad|grep -E 'ba{0,0}d'
bad
$ echo bad|src/grep -E 'ba{0,0}d'
[Exit 1]
$
ACK.
Re: [PATCH 1/3] dfa: simplify dfainit, Jim Meyering, 2010/04/17