Subject: bug#19361: closed (Re: [PATCH] dfa: more simplification of dfaexec_main)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 02 Jun 2016 22:51:02 +0000

Your bug report

#19361: [PATCH] dfa: more simplification of dfaexec_main

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
19361: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19361
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [PATCH] dfa: more simplification of dfaexec_main
From: Paul Eggert <[email-masked]>
To: Norihiro Tanaka <[email-masked]>
Cc: [email-masked]
Date: Thu, 2 Jun 2016 15:50:28 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks, I installed that.

Subject: [PATCH] dfa: more simplification of dfaexec_main
From: Norihiro Tanaka <[email-masked]>
To: [email-masked]
Date: Sat, 13 Dec 2014 10:26:03 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

I simplified dfaexec_main in bug#19252, but it was not enough.  This
change additionally simplifies it.  The change induces no semantic change.
From 0253cb531086ee3d3aceccb9f5a6ae7b3cc4dbdf Mon Sep 17 00:00:00 2001
From: Norihiro Tanaka <[email-masked]>
Date: Sat, 13 Dec 2014 10:10:13 +0900
Subject: [PATCH] dfa: more simplification of dfaexec_main

* src/dfa.c (dfaexec_main): Failure at an acceptable position and demand
to build state is unlikely.  So go next loop without checking them after
a newline.  This commit induces no semantic change.
---
 src/dfa.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/dfa.c b/src/dfa.c
index 806cb04..2da21f6 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3474,8 +3474,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end,
 
           s = allow_nl ? d->newlines[s1] : 0;
         }
-
-      if (d->fails[s])
+      else if (d->fails[s])
         {
           if (d->success[s] & sbit[*p])
             {
@@ -3492,8 +3491,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end,
         }
       else
         {
-          if (!d->trans[s])
-            build_state (s, d);
+          build_state (s, d);
           trans = d->trans;
         }
     }
-- 
2.2.0