gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1981-g41232b


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1981-g41232b0
Date: Fri, 9 Sep 2016 05:38:16 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  41232b08f9db67a0a6d3e86324d776496c212560 (commit)
      from  45ee4486199d449b9aeaeadcf98523d82f943ec8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=41232b08f9db67a0a6d3e86324d776496c212560

commit 41232b08f9db67a0a6d3e86324d776496c212560
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Sep 9 08:37:55 2016 +0300

    Sync dfa.c. The neverending story.

diff --git a/ChangeLog b/ChangeLog
index 5542d69..09d2a22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-09-09         Arnold D. Robbins     <address@hidden>
+
+       * dfa.c: Sync with grep.
+
 2016-09-08  Paul Eggert  <address@hidden>
 
        * dfa.c, dfa.h: Sync with grep.
diff --git a/dfa.c b/dfa.c
index cf9b2ba..b162a3b 100644
--- a/dfa.c
+++ b/dfa.c
@@ -1487,7 +1487,7 @@ lex (struct dfa *dfa)
             {
               zeroset (ccl);
               for (c2 = 0; c2 < NOTCHAR; ++c2)
-                if (unibyte_word_constituent (dfa, c2))
+                if (dfa->syntax.sbit[c2] == CTX_LETTER)
                   setbit (c2, ccl);
               if (c == 'W')
                 notset (ccl);
@@ -2204,11 +2204,10 @@ charclass_context (struct dfa const *dfa, charclass c)
   int context = 0;
   unsigned int j;
 
-  if (tstbit (dfa->syntax.eolbyte, c))
-    context |= CTX_NEWLINE;
-
   for (j = 0; j < CHARCLASS_WORDS; ++j)
     {
+      if (c[j] & dfa->syntax.newline[j])
+        context |= CTX_NEWLINE;
       if (c[j] & dfa->syntax.letters[j])
         context |= CTX_LETTER;
       if (c[j] & ~(dfa->syntax.letters[j] | dfa->syntax.newline[j]))
@@ -2702,13 +2701,27 @@ dfastate (state_num s, struct dfa *d, state_num trans[])
      is to fail miserably.  */
   if (d->searchflag)
     {
+      int c;
+
       state_newline = 0;
       state_letter = d->min_trcount - 1;
       state = d->initstate_notbol;
 
-      for (i = 0; i < NOTCHAR; ++i)
-        trans[i] = unibyte_word_constituent (d, i) ? state_letter : state;
-      trans[d->syntax.eolbyte] = state_newline;
+      for (c = 0; c < NOTCHAR; ++c)
+        {
+          switch (d->syntax.sbit[c])
+            {
+            case CTX_NEWLINE:
+              trans[c] = state_newline;
+              break;
+            case CTX_LETTER:
+              trans[c] = state_letter;
+              break;
+            default:
+              trans[c] = state;
+              break;
+            }
+        }
     }
   else
     for (i = 0; i < NOTCHAR; ++i)
@@ -2811,12 +2824,18 @@ dfastate (state_num s, struct dfa *d, state_num trans[])
             {
               int c = j * CHARCLASS_WORD_BITS + k;
 
-              if (c == d->syntax.eolbyte)
-                trans[c] = state_newline;
-              else if (unibyte_word_constituent (d, c))
-                trans[c] = state_letter;
-              else if (c < NOTCHAR)
-                trans[c] = state;
+              switch (d->syntax.sbit[c])
+                {
+                case CTX_NEWLINE:
+                  trans[c] = state_newline;
+                  break;
+                case CTX_LETTER:
+                  trans[c] = state_letter;
+                  break;
+                default:
+                  trans[c] = state;
+                  break;
+                }
             }
     }
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |    4 ++++
 dfa.c     |   45 ++++++++++++++++++++++++++++++++-------------
 2 files changed, 36 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]