[Pcre-svn] [1020] code/trunk: Fix bugs of omission in new sc…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [1020] code/trunk: Fix bugs of omission in new script run code.
Revision: 1020
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1020
Author:   ph10
Date:     2018-10-03 16:41:47 +0100 (Wed, 03 Oct 2018)
Log Message:
-----------
Fix bugs of omission in new script run code.


Modified Paths:
--------------
    code/trunk/src/pcre2_compile.c
    code/trunk/testdata/testinput4
    code/trunk/testdata/testinput5
    code/trunk/testdata/testoutput4
    code/trunk/testdata/testoutput5


Modified: code/trunk/src/pcre2_compile.c
===================================================================
--- code/trunk/src/pcre2_compile.c    2018-10-02 15:25:58 UTC (rev 1019)
+++ code/trunk/src/pcre2_compile.c    2018-10-03 15:41:47 UTC (rev 1020)
@@ -8640,6 +8640,7 @@
     case META_LOOKBEHIND:
     case META_LOOKBEHINDNOT:
     case META_NOCAPTURE:
+    case META_SCRIPT_RUN: 
     nestlevel++;
     break;


@@ -9052,6 +9053,7 @@

     case META_ATOMIC:
     case META_NOCAPTURE:
+    case META_SCRIPT_RUN: 
     pptr++;
     CHECK_GROUP:
     grouplength = get_grouplength(&pptr, TRUE, errcodeptr, lcptr, group,
@@ -9231,6 +9233,7 @@
     case META_QUERY_QUERY:
     case META_RANGE_ESCAPED:
     case META_RANGE_LITERAL:
+    case META_SCRIPT_RUN: 
     case META_SKIP:
     case META_THEN:
     break;


Modified: code/trunk/testdata/testinput4
===================================================================
--- code/trunk/testdata/testinput4    2018-10-02 15:25:58 UTC (rev 1019)
+++ code/trunk/testdata/testinput4    2018-10-03 15:41:47 UTC (rev 1020)
@@ -2395,6 +2395,16 @@
 \= Expect no match
     \x{1100}\x{2e80}\x{3041}\x{1101}   Hangul Han Hiragana Hangul


+/(?<!)(*sr:)/
+
+/(?<!X(*sr:B)C)/
+
+/(?<=abc(?=X(*sr:BCY)Z)XBCYZ)./
+    abcXBCYZ!
+
+/(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./
+   abcXBXYCCC!
+
 # Test loop breaking for empty string match


/^(*sr:A|)*BCD/utf

Modified: code/trunk/testdata/testinput5
===================================================================
--- code/trunk/testdata/testinput5    2018-10-02 15:25:58 UTC (rev 1019)
+++ code/trunk/testdata/testinput5    2018-10-03 15:41:47 UTC (rev 1020)
@@ -2119,6 +2119,11 @@


/^(*sr:\x{2e80}*)\x{2e80}/B,utf

+/(?<!)(*sr:)/B
+
+/(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./B
+ abcXBXYCCC!
+
# Some script run patterns are broken in Perl 5.28.0. These can be moved into
# test 4 when a mended version of Perl is released.


Modified: code/trunk/testdata/testoutput4
===================================================================
--- code/trunk/testdata/testoutput4    2018-10-02 15:25:58 UTC (rev 1019)
+++ code/trunk/testdata/testoutput4    2018-10-03 15:41:47 UTC (rev 1020)
@@ -3873,6 +3873,18 @@
     \x{1100}\x{2e80}\x{3041}\x{1101}   Hangul Han Hiragana Hangul
 No match


+/(?<!)(*sr:)/
+
+/(?<!X(*sr:B)C)/
+
+/(?<=abc(?=X(*sr:BCY)Z)XBCYZ)./
+    abcXBCYZ!
+ 0: !
+
+/(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./
+   abcXBXYCCC!
+ 0: !
+
 # Test loop breaking for empty string match


/^(*sr:A|)*BCD/utf

Modified: code/trunk/testdata/testoutput5
===================================================================
--- code/trunk/testdata/testoutput5    2018-10-02 15:25:58 UTC (rev 1019)
+++ code/trunk/testdata/testoutput5    2018-10-03 15:41:47 UTC (rev 1020)
@@ -4817,6 +4817,39 @@
         End
 ------------------------------------------------------------------


+/(?<!)(*sr:)/B
+------------------------------------------------------------------
+        Bra
+        AssertB not
+        Ket
+        Script run
+        Ket
+        Ket
+        End
+------------------------------------------------------------------
+
+/(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./B
+------------------------------------------------------------------
+        Bra
+        AssertB
+        Reverse
+        abc
+        Assert
+        X
+        Script run
+        BXY
+        Ket
+        CCC
+        Ket
+        XBXYCCC
+        Ket
+        Any
+        Ket
+        End
+------------------------------------------------------------------
+   abcXBXYCCC!
+ 0: !
+
 # Some script run patterns are broken in Perl 5.28.0. These can be moved into
 # test 4 when a mended version of Perl is released.