Norihiro Tanaka wrote:
You say we can simplified by the changes for
multithreading, but two changes in the patch are needed.

Thanks, I missed that. I installed your patch, along with the attached minor cleanup, and am closing this bug report.
>From 8cbb400a68e94e7c438bede18b20993d180a3f90 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Fri, 2 Sep 2016 22:05:28 -0700
Subject: [PATCH] dfa: minor cleanup of previous change

* src/dfa.c (dfaexec_main): Omit redundant code and reindent.
---
 src/dfa.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/dfa.c b/src/dfa.c
index c5bebfe..5c045ac 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3171,12 +3171,10 @@ dfaexec_main (struct dfa *d, char const *begin, char *end, bool allow_nl,
           nlcount++;
           mbp = p;
 
-          s = allow_nl ? d->newlines[s1] : 0;
-
           s = (allow_nl ? d->newlines[s1]
-               : (d->syntax.sbit[eol] == CTX_NEWLINE ? 0
-                  : (d->syntax.sbit[eol] == CTX_LETTER ? d->min_trcount - 1
-                     : d->initstate_notbol)));
+               : d->syntax.sbit[eol] == CTX_NEWLINE ? 0
+               : d->syntax.sbit[eol] == CTX_LETTER ? d->min_trcount - 1
+               : d->initstate_notbol);
         }
       else if (d->fails[s])
         {
-- 
2.7.4

Reply via email to