Skip to content

Fix compilation of patterns incorporating ECLASS and lookbehinds - #961

Merged
NWilson merged 1 commit into
mainfrom
user/niwilson/fix-lookbehind-eclass
Aug 24, 2026
Merged

Fix compilation of patterns incorporating ECLASS and lookbehinds#961
NWilson merged 1 commit into
mainfrom
user/niwilson/fix-lookbehind-eclass

Conversation

@NWilson

@NWilson NWilson commented Aug 23, 2026

Copy link
Copy Markdown
Member

Reported in #959

@NWilson NWilson added this to the 10.48 milestone Aug 23, 2026

@carenas carenas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the following tests instead in my version, which are IMHO more realistic and cover also the perl class syntax:

diff --git a/testdata/testinput1 b/testdata/testinput1
index 64b697f3..91e2c7a1 100644
--- a/testdata/testinput1
+++ b/testdata/testinput1
@@ -7154,6 +7154,13 @@ $/x
 \= Expect no match
     z
 
+/(?[\d-[1]]).(?<!x)/
+    0a
+    90
+\= Expect no match
+    1a
+    0x
+
 /^.{4}/s
     abcdef
     abcde
diff --git a/testdata/testinput2 b/testdata/testinput2
index a7c1c846..c205e68e 100644
--- a/testdata/testinput2
+++ b/testdata/testinput2
@@ -7407,6 +7407,13 @@ a)"xI
 /[^[[^]~~[^]]]/B,alt_extended_class,allow_empty_class
     a
 
+/[\d--1].(?<!x)/alt_extended_class
+    0a
+    90
+\= Expect no match
+    1a
+    0x
+
 # --------------
 

@NWilson
NWilson force-pushed the user/niwilson/fix-lookbehind-eclass branch from 7c3e142 to d55d602 Compare August 23, 2026 19:42
@NWilson

NWilson commented Aug 23, 2026

Copy link
Copy Markdown
Member Author

Thanks @carenas! That's a good testcase, I've added it to my PR.

@NWilson
NWilson force-pushed the user/niwilson/fix-lookbehind-eclass branch from d55d602 to fe6851c Compare August 23, 2026 19:47

@carenas carenas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Perl compatible extended class syntax test could have gone to test1 as was originally suggested, though

@NWilson

NWilson commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

Most of the perl eclass tests are in testinput2. I put it with the existing block.

@NWilson
NWilson merged commit 611ffbd into main Aug 24, 2026
39 checks passed
@NWilson
NWilson deleted the user/niwilson/fix-lookbehind-eclass branch August 24, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants