Revision: 969
http://www.exim.org/viewvc/pcre2?view=rev&revision=969
Author: ph10
Date: 2018-07-21 15:52:26 +0100 (Sat, 21 Jul 2018)
Log Message:
-----------
Some places where the new opcode OP_COMMIT_ARG needs to be handled and which I
forgot.
Modified Paths:
--------------
code/trunk/src/pcre2_find_bracket.c
code/trunk/src/pcre2_pattern_info.c
code/trunk/src/pcre2_printint.c
code/trunk/src/pcre2_study.c
code/trunk/testdata/testinput2
code/trunk/testdata/testoutput2
Modified: code/trunk/src/pcre2_find_bracket.c
===================================================================
--- code/trunk/src/pcre2_find_bracket.c 2018-07-21 14:34:51 UTC (rev 968)
+++ code/trunk/src/pcre2_find_bracket.c 2018-07-21 14:52:26 UTC (rev 969)
@@ -7,7 +7,7 @@
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -131,6 +131,7 @@
break;
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
case OP_THEN_ARG:
Modified: code/trunk/src/pcre2_pattern_info.c
===================================================================
--- code/trunk/src/pcre2_pattern_info.c 2018-07-21 14:34:51 UTC (rev 968)
+++ code/trunk/src/pcre2_pattern_info.c 2018-07-21 14:52:26 UTC (rev 969)
@@ -7,7 +7,7 @@
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -390,6 +390,7 @@
#endif
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
case OP_THEN_ARG:
Modified: code/trunk/src/pcre2_printint.c
===================================================================
--- code/trunk/src/pcre2_printint.c 2018-07-21 14:34:51 UTC (rev 968)
+++ code/trunk/src/pcre2_printint.c 2018-07-21 14:52:26 UTC (rev 969)
@@ -7,7 +7,7 @@
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -799,6 +799,7 @@
break;
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
case OP_THEN_ARG:
Modified: code/trunk/src/pcre2_study.c
===================================================================
--- code/trunk/src/pcre2_study.c 2018-07-21 14:34:51 UTC (rev 968)
+++ code/trunk/src/pcre2_study.c 2018-07-21 14:52:26 UTC (rev 969)
@@ -7,7 +7,7 @@
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2016-2017 University of Cambridge
+ New API code Copyright (c) 2016-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -707,6 +707,7 @@
/* Skip these, but we need to add in the name length. */
case OP_MARK:
+ case OP_COMMIT_ARG:
case OP_PRUNE_ARG:
case OP_SKIP_ARG:
case OP_THEN_ARG:
@@ -956,6 +957,7 @@
case OP_CIRCM:
case OP_CLOSE:
case OP_COMMIT:
+ case OP_COMMIT_ARG:
case OP_COND:
case OP_CREF:
case OP_FALSE:
Modified: code/trunk/testdata/testinput2
===================================================================
--- code/trunk/testdata/testinput2 2018-07-21 14:34:51 UTC (rev 968)
+++ code/trunk/testdata/testinput2 2018-07-21 14:52:26 UTC (rev 969)
@@ -2949,6 +2949,8 @@
/abc(*:)pqr/
+/(*COMMIT:X)/B
+
# This should, and does, fail. In Perl, it does not, which I think is a
# bug because replacing the B in the pattern by (B|D) does make it fail.
# Turning off Perl's optimization by inserting (??{""}) also makes it fail.
Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2 2018-07-21 14:34:51 UTC (rev 968)
+++ code/trunk/testdata/testoutput2 2018-07-21 14:52:26 UTC (rev 969)
@@ -10154,6 +10154,14 @@
/abc(*:)pqr/
Failed: error 166 at offset 6: (*MARK) must have an argument
+/(*COMMIT:X)/B
+------------------------------------------------------------------
+ Bra
+ *COMMIT X
+ Ket
+ End
+------------------------------------------------------------------
+
# This should, and does, fail. In Perl, it does not, which I think is a
# bug because replacing the B in the pattern by (B|D) does make it fail.
# Turning off Perl's optimization by inserting (??{""}) also makes it fail.