gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4165-g6faeff9


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4165-g6faeff9
Date: Sun, 1 Nov 2020 12:59:05 -0500 (EST)

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, gawk-5.1-stable has been updated
       via  6faeff915e961443d66b10caf9af4cbed6fb8451 (commit)
      from  c2f26d724d65ae3972920013e785906bb4983c96 (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=6faeff915e961443d66b10caf9af4cbed6fb8451

commit 6faeff915e961443d66b10caf9af4cbed6fb8451
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sun Nov 1 19:58:47 2020 +0200

    Fix a bug in dfa.c, add test case.

diff --git a/pc/ChangeLog b/pc/ChangeLog
index c7eb8c0..fe1a53d 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-01         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * Makefile.tst: Rebuilt.
+
 2020-10-05         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.tst: Rebuilt.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 2576639..318a5b6 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -149,7 +149,8 @@ BASIC_TESTS = \
        back89 backgsub badassign1 badbuild \
        callparam childin clobber closebad clsflnam compare compare2 \
        concat1 concat2 concat3 concat4 concat5 convfmt \
-       datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress 
dynlj \
+       datanonl defref delargv delarpm2 delarprm delfunc \
+       dfacheck2 dfamb1 dfastress dynlj \
        escapebrace eofsplit eofsrc1 exit2 exitval1 exitval2 exitval3 \
        fcall_exit fcall_exit2 fldchg fldchgnf fldterm fnamedat fnarray 
fnarray2 \
        fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fscaret fsnul1 \
@@ -1495,6 +1496,11 @@ delfunc:
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+dfacheck2:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 || 
echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 dfamb1:
        @echo $@ $(ZOS_FAIL)
        @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; export GAWKLOCALE; \
diff --git a/support/ChangeLog b/support/ChangeLog
index b81b0e7..edef437 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-01         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * dfa.c: Synced from GNULIB.
+
 2020-10-15         Arnold D. Robbins     <arnold@skeeve.com>
 
        * random.c: Move code to using prototypes.
diff --git a/support/dfa.c b/support/dfa.c
index 8aef2f3..df32dd9 100644
--- a/support/dfa.c
+++ b/support/dfa.c
@@ -2437,7 +2437,7 @@ merge_nfa_state (struct dfa *d, idx_t tindex, char *flags,
           continue;
         }
 
-      if (!(flags[sindex] & (OPT_LPAREN | OPT_RPAREN)))
+      if (sindex != tindex && !(flags[sindex] & (OPT_LPAREN | OPT_RPAREN)))
         {
           idx_t j;
 
@@ -2445,6 +2445,9 @@ merge_nfa_state (struct dfa *d, idx_t tindex, char *flags,
             {
               idx_t dindex = follows[tindex].elems[j].index;
 
+              if (dindex == tindex)
+                continue;
+
               if (follows[tindex].elems[j].constraint != iconstraint)
                 continue;
 
diff --git a/test/Makefile.am b/test/Makefile.am
index d6bf7c2..aebdf83 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -253,6 +253,9 @@ EXTRA_DIST = \
        dfacheck1.awk \
        dfacheck1.in \
        dfacheck1.ok \
+       dfacheck2.awk \
+       dfacheck2.in \
+       dfacheck2.ok \
        dfamb1.awk \
        dfamb1.in \
        dfamb1.ok \
@@ -1371,7 +1374,8 @@ BASIC_TESTS = \
        back89 backgsub badassign1 badbuild \
        callparam childin clobber closebad clsflnam compare compare2 \
        concat1 concat2 concat3 concat4 concat5 convfmt \
-       datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress 
dynlj \
+       datanonl defref delargv delarpm2 delarprm delfunc \
+       dfacheck2 dfamb1 dfastress dynlj \
        escapebrace eofsplit eofsrc1 exit2 exitval1 exitval2 exitval3 \
        fcall_exit fcall_exit2 fldchg fldchgnf fldterm fnamedat fnarray 
fnarray2 \
        fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fscaret fsnul1 \
diff --git a/test/Makefile.in b/test/Makefile.in
index 884d353..bed55b9 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -516,6 +516,9 @@ EXTRA_DIST = \
        dfacheck1.awk \
        dfacheck1.in \
        dfacheck1.ok \
+       dfacheck2.awk \
+       dfacheck2.in \
+       dfacheck2.ok \
        dfamb1.awk \
        dfamb1.in \
        dfamb1.ok \
@@ -1634,7 +1637,8 @@ BASIC_TESTS = \
        back89 backgsub badassign1 badbuild \
        callparam childin clobber closebad clsflnam compare compare2 \
        concat1 concat2 concat3 concat4 concat5 convfmt \
-       datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress 
dynlj \
+       datanonl defref delargv delarpm2 delarprm delfunc \
+       dfacheck2 dfamb1 dfastress dynlj \
        escapebrace eofsplit eofsrc1 exit2 exitval1 exitval2 exitval3 \
        fcall_exit fcall_exit2 fldchg fldchgnf fldterm fnamedat fnarray 
fnarray2 \
        fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fscaret fsnul1 \
@@ -3164,6 +3168,11 @@ delfunc:
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+dfacheck2:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 || 
echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 dfamb1:
        @echo $@ $(ZOS_FAIL)
        @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \
diff --git a/test/Maketests b/test/Maketests
index 2cf7133..7fc7d87 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -256,6 +256,11 @@ delfunc:
        @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: $$? 
>>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+dfacheck2:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 || 
echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 dfamb1:
        @echo $@ $(ZOS_FAIL)
        @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \
diff --git a/test/dfacheck2.awk b/test/dfacheck2.awk
new file mode 100644
index 0000000..baafcf9
--- /dev/null
+++ b/test/dfacheck2.awk
@@ -0,0 +1 @@
+/^x+x+x+x+y$/
diff --git a/test/dfacheck2.in b/test/dfacheck2.in
new file mode 100644
index 0000000..b22b41c
--- /dev/null
+++ b/test/dfacheck2.in
@@ -0,0 +1,3 @@
+xxy
+xxxy
+xxxxy
diff --git a/test/dfacheck2.ok b/test/dfacheck2.ok
new file mode 100644
index 0000000..816275b
--- /dev/null
+++ b/test/dfacheck2.ok
@@ -0,0 +1 @@
+xxxxy

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

Summary of changes:
 pc/ChangeLog       |  4 ++++
 pc/Makefile.tst    |  8 +++++++-
 support/ChangeLog  |  4 ++++
 support/dfa.c      |  5 ++++-
 test/Makefile.am   |  6 +++++-
 test/Makefile.in   | 11 ++++++++++-
 test/Maketests     |  5 +++++
 test/dfacheck2.awk |  1 +
 test/dfacheck2.in  |  3 +++
 test/dfacheck2.ok  |  1 +
 10 files changed, 44 insertions(+), 4 deletions(-)
 create mode 100644 test/dfacheck2.awk
 create mode 100644 test/dfacheck2.in
 create mode 100644 test/dfacheck2.ok


hooks/post-receive
-- 
gawk



reply via email to

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