-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
CL-PPCRE validates register names too early in the regex compilation phase. The converter should wait until it has seen all register names before asserting that named back-references refer to existing registers.
(setf *allow-named-registers* t)
==> T
(scan "\\k<regOne>(?<regOne>.)" "a")
; Evaluation aborted on #<PPCRE-SYNTAX-ERROR "Illegal back-reference: ~S." {1006D50F93}>.
(scan "\\1(.)" "a")
==> NILCompare this to Perl:
say 'a' =~ /\k<regOne>(?<regOne>.)/ ? 'true' : 'false';
==> false
say 'a' =~ /\k<regTwo>(?<regOne>.)/ ? 'true' : 'false';
==> Reference to nonexistent named group in regex...I plan on fixing this in my subpattern references branch, which is nearing completion.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels