Skip Menu |

This queue is for tickets about the Regexp-Debugger CPAN distribution.

Report information
The Basics
Id: 133316
Status: rejected
Priority: 0/
Queue: Regexp-Debugger

People
Owner: Nobody in particular
Requestors: XENU [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: lookahead/lookbehind combined with \K in the same pattern causes compilation error
The following script: use Regexp::Debugger; "" =~ m{ foo(?=foo)\K }x; fails with: $VAR1 = { 'std_info' => { 'construct_type' => undef, 'regex_pos' => 0, 'construct' => '', 'depth' => 1, 'indent' => ' ', 'quantifier' => '' }, '%+' => { 'construct' => '', 'start' => '' } }; $VAR1 = { 'std_info' => { 'indent' => ' ', 'quantifier' => '', 'construct_type' => undef, 'depth' => 2, 'construct' => ' ', 'regex_pos' => 0 }, '%+' => { 'construct' => ' ', 'whitespace' => ' ', 'whitespace_chars' => ' ' } }; $VAR1 = { '%+' => { 'atom' => 'foo', 'construct' => 'foo', '_self_matching' => 'foo' }, 'std_info' => { 'indent' => ' ', 'quantifier' => '', 'construct_type' => '_self_matching', 'regex_pos' => 1, 'construct' => 'foo', 'depth' => 2 } }; $VAR1 = { 'std_info' => { 'indent' => ' ', 'quantifier' => '', 'construct_type' => undef, 'depth' => 2, 'regex_pos' => 4, 'construct' => '(?=' }, '%+' => { 'construct' => '(?=', 'lookaround_paren' => '(?=' } }; $VAR1 = { 'std_info' => { 'indent' => ' ', 'quantifier' => '', 'construct_type' => '_self_matching', 'construct' => 'foo', 'regex_pos' => 7, 'depth' => 3 }, '%+' => { 'atom' => 'foo', 'construct' => 'foo', '_self_matching' => 'foo' } }; $VAR1 = { '%+' => { 'construct' => ')', 'closing_paren' => ')' }, 'std_info' => { 'quantifier' => '', 'indent' => ' ', 'regex_pos' => 10, 'construct' => ')', 'depth' => 3, 'construct_type' => undef } }; $VAR1 = { '%+' => { 'construct' => '\\K', 'keep_marker' => '\\K' }, 'std_info' => { 'indent' => ' ', 'quantifier' => '', 'construct_type' => undef, 'depth' => 2, 'construct' => '\\K', 'regex_pos' => 11 } }; $VAR1 = { '%+' => { 'construct' => ' ', 'whitespace' => ' ', 'whitespace_chars' => ' ' }, 'std_info' => { 'construct_type' => undef, 'construct' => ' ', 'regex_pos' => 13, 'depth' => 2, 'indent' => ' ', 'quantifier' => '' } }; $VAR1 = { 'std_info' => { 'construct_type' => undef, 'depth' => 2, 'regex_pos' => 14, 'construct' => '', 'indent' => ' ', 'quantifier' => '' }, '%+' => { 'construct' => '', 'end' => '' } }; \K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?#R_d:0)(?>\A(?{Regexp::Debugger::_reset_debugger_state()})(?!)|\G(?{Regexp::Debugger::_reset_debugger_state_rematch()})(?!))|(?:(?{Regexp::Debugger::_report_event(0, 0, pos()); $^R})(?=)(?:(?>(?{local $Regexp::Debugger::prevpos=pos}) (?{ if (defined $Regexp::Debugger::prevpos && $Regexp::Debugger::prevpos < pos){ Regexp::Debugger::_report_event(0, 1, $Regexp::Debugger::prevpos); Regexp::Debugger::_report_event(0, 1+1, pos()); }$^R })|(?{ Regexp::Debugger::_report_event(0, 1, pos()); $^R })(?!))(?{Regexp::Debugger::_report_event(0, 3, pos()); $^R})(?=)foo(?{Regexp::Debugger::_report_event(0, 4, pos()); $^R})(?=)(?:(?{Regexp::Debugger::_report_event(0, 5, pos()); $^R})(?=)(?=(?{Regexp::Debugger::_report_event(0, 6, pos()); $^R})(?=)foo(?{Regexp::Debugger::_report_event(0, 7, pos()); $^R})(?=))(?{Regexp::Debugger::_report_event(0, 8, pos()); $^R})(?=))(?{Regexp::Debugger::_report_event(0, 10, pos()); $^R})(?=)\K <-- HERE (?{ local $Regexp::Grammars::match_start_pos = pos() })(?>(?{local $Regexp::Debugger::prevpos=pos}) (?{ if (defined $Regexp::Debugger::prevpos && $Regexp::Debugger::prevpos < pos){ Regexp::Debugger::_report_event(0, 11, $Regexp::Debugger::prevpos); Regexp::Debugger::_report_event(0, 11+1, pos()); }$^R })|(?{ Regexp::Debugger::_report_event(0, 11, pos()); $^R })(?!)))(?{Regexp::Debugger::_report_event(0, 13, pos()); $^R})(?=)|(?{Regexp::Debugger::_report_event(0, 14, pos()); $^R})(?=)(?!))/ at (eval 11) line 17.
Subject: Re: [rt.cpan.org #133316] lookahead/lookbehind combined with \K in the same pattern causes compilation error
Date: Sat, 12 Sep 2020 11:35:46 +0000
To: bug-Regexp-Debugger [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Thanks for the report, Tomasz. However, this is actually a bug in Perl v5.32, not in Regexp::Debugger. For example, the following code also incorrectly reports a problem with the \K: use v5.32; 'x' =~ m/(?=(?=x)x)\K/; I have reported this bug to p5p. Damian
On 2020-09-12 04:36:30, damian@conway.org wrote: Show quoted text
> I have reported this bug to p5p.
Could you provide a link? I am unable to find it. thanks!
Subject: Re: [rt.cpan.org #133316] lookahead/lookbehind combined with \K in the same pattern causes compilation error
Date: Sat, 12 Sep 2020 22:57:51 +0000
To: bug-Regexp-Debugger [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
It was reported via perlbug, but I have not received a copy myself. I have now reported it directly via github instead: https://github.com/Perl/perl5/issues/18123 Damian
On 2020-09-12 15:58:34, damian@conway.org wrote: Show quoted text
> It was reported via perlbug
The RT queue has now been closed, in favour of github. Did perlbug give you any error? In what version of perl was it running in? (I am concerned that a poor user experience is being offered, and other bug reports may be falling into a black hole.)
Subject: Re: [rt.cpan.org #133316] lookahead/lookbehind combined with \K in the same pattern causes compilation error
Date: Sun, 13 Sep 2020 01:07:16 +0000
To: bug-Regexp-Debugger [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Show quoted text
> The RT queue has now been closed, in favour of github. > Did perlbug give you any error?
No. There was a statement buried in the instructions: To ensure your issue can be best tracked and resolved, you should submit it to the GitHub issue tracker at https://github.com/Perl/perl5/issues ...however perlbug still offered to mail the report directly instead. I've appended the entire interactive session below. In my view it really doesn't make it sufficiently clear that github is now the only avenue of successful bug reporting for core issues. Show quoted text
> In what version of perl was it running in?
v5.32.0 Show quoted text
> (I am concerned that a poor user experience is being offered, and > other bug reports may be falling into a black hole.)
I think that's an entirely valid concern. Thank-you for looking into this issue, Karen. Damian -----cut----------cut----------cut----------cut----------cut----------cut----- [~] perl -v This is perl 5, version 32, subversion 0 (v5.32.0) built for darwin-2level Copyright 1987-2020, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. [~] perlbug This program provides an easy way to generate a bug report for the core perl distribution (along with tests or patches). To send a thank-you note to perl-thanks@perl.org instead of a bug report, please run 'perlthanks'. The GitHub issue tracker at https://github.com/Perl/perl5/issues is the best place to submit your report so it can be tracked and resolved. Please do not use /Users/damian/perl5/perlbrew/perls/perl- 5.32.0/bin/perlbug to report bugs in perl modules from CPAN. Suggestions for how to find help using Perl can be found at https://perldoc.perl.org/perlcommunity.html First of all, please provide a subject for the report. This should be a concise description of your bug or problem which will help the volunteers working to improve perl to categorize and resolve the issue. Be as specific and descriptive as you can. A subject like "perl bug" or "perl problem" will make it much less likely that your issue gets the attention it deserves. Subject: Incorrect error messages for \K outside a lookahead in Per, 5.32 Perl's developers may need your email address to contact you for further information about your issue or to inform you when it is resolved. If the default shown is not your email address, please correct it. Your address [damian@daneel.local]: damian@conway.org It's now time to compose your bug report. Try to make the report concise but descriptive. Please include any detail which you think might be relevant or might help the volunteers working to improve perl. If you are reporting something that does not work as you think it should, please try to include examples of the actual result and of what you expected. Some information about your local perl configuration will automatically be included at the end of your report. If you are using an unusual version of perl, it would be useful if you could confirm that you can replicate the problem on a standard build of perl as well. You will probably want to use a text editor to enter the body of your report. If "/Applications/MacVim.app/Contents/MacOS/Vim" is the editor you want to use, then just press Enter, otherwise type in the name of the editor you would like to use. If you have already composed the body of your report, you may enter "file", and /Users/damian/perl5/perlbrew/perls/perl- 5.32.0/bin/perlbug will prompt you to enter the name of the file containing your report. Editor [/Applications/MacVim.app/Contents/MacOS/Vim]: If your bug is about a Perl module rather than a core language feature, please enter its name here. If it's not, just hit Enter to skip this question. Module: Please pick a category from the following list: core docs install library utilities Category [core]: Please pick a severity from the following list: critical high medium low wishlist none Severity [low]: medium You have finished composing your report. At this point, you have a few options. You can: * Save the report to a [f]ile * [Se]nd the report to the Perl developers and damian@daneel.local * [D]isplay the report on the screen * [R]e-edit the report * Display or change the report's [su]bject * [Q]uit without generating the report Action (Save/Send/Display/Edit/Subject/Quit): Se To ensure your issue can be best tracked and resolved, you should submit it to the GitHub issue tracker at https://github.com/Perl/perl5/issues Are you certain you want to send this report to the Perl developers and damian@daneel.local? Please type "yes" if you are [no]: yes Message sent Thank you for taking the time to file a bug report! Please note that mailing lists are moderated, your message may take a while to show up. Please consider submitting your report directly to the issue tracker at https://github.com/Perl/perl5/issues