Skip Menu |
 

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

Report information
The Basics
Id: 77650
Status: open
Priority: 0/
Queue: Regexp-Assemble

People
Owner: Nobody in particular
Requestors: Xavier (no email address)
Cc:
AdminCc:

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



Subject: Regular expression syntax errors after adding simple regexps when unroll_plus is enabled
Download (untitled) / with headers
text/plain 816b
Hi, 1 bugs is reported by a Debian user : This perl script terminates with error like: Unmatched ( in regex; marked by <-- HERE in m/\A( <-- HERE (x)\*(\??)\Z/ at /usr/share/perl5/Regexp/Assemble.pm line 2734. --->8--- use strict; use Regexp::Assemble; my $ra = Regexp::Assemble->new(unroll_plus => 1); # any of bellow valid regular expression can be uncommented, to show problem #$ra->add('((a|b)cz+)?'); #$ra->add('((ab|cy)z)'); $ra->add('((x)y)'); # simplest one #$ra->add('((x)+y)+'); #$ra->add('(b(x))'); #$ra->add('a(b(x))'); print $ra->re; ---8<--- It looks that Regexp::Assembler incorrectly handles paranthesis for some reasons in this simple expressions. Interesingly despite this "simplest one" example not having "+" operator, Regexp::Assemble behaves correctly after disabling unroll_plus option!
Perhaps https://metacpan.org/release/Regexp-Parsertron will help in some way.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.