Bug#675984: libregexp-assemble-perl: Doesn't handle closing parenthesis in charracter class correctly

2012-06-05 Thread Xavier
Le 04/06/2012 20:59, Witold Baryluk a écrit :
 ...
 After escaping closing ], character class is still going on, and s-[ is
 interpreted
 as character class range, but s-[ is invalid due to the fact that s is AFTER [
 in encoding.
 
 
 (Building message is just print STDERR Building: $str\n;
 added to sub _build_re in Regexp/Assemble.pm line 1004., to make debugging
 easier).
 
 
 Regards,
 Witek

Hi Witek,

Thanks for your report. It has been posted to the upstream author :
https://rt.cpan.org/Ticket/Display.html?id=77651

Xavier



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#675984: libregexp-assemble-perl: Doesn't handle closing parenthesis in charracter class correctly

2012-06-04 Thread Witold Baryluk
Package: libregexp-assemble-perl
Version: 0.35-5
Severity: important

Hello again.

One more problem.

This code doesn't work properly, but should without problem

use strict;
use Regexp::Assemble;
my $ra = Regexp::Assemble-new();
$ra-add('([^)])s-[01]');
print $ra-re;



It looks like Regexp::Assemble thinks that ) in [^)] need to be escaped
(It doesn't - only ]$^-\  have special mining and may need escaping (but
sometimes doesn't need))
but places escape character in wrong position:

Building: (?:([^)\])s-[01]|((x)y))
Invalid [] range s-[ in regex; marked by -- HERE in m/(?:([^)\])s-[ -- HERE
01]|((x)y))/ at /usr/share/perl5/Regexp/Assemble.pm line 1004.


After escaping closing ], character class is still going on, and s-[ is
interpreted
as character class range, but s-[ is invalid due to the fact that s is AFTER [
in encoding.


(Building message is just print STDERR Building: $str\n;
added to sub _build_re in Regexp/Assemble.pm line 1004., to make debugging
easier).


Regards,
Witek



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.4.0-t43-devel-up-10118-g233e562-dirty
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to pl_PL.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libregexp-assemble-perl depends on:
ii  perl  5.14.2-11

libregexp-assemble-perl recommends no packages.

libregexp-assemble-perl suggests no packages.

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/perl5/Regexp/Assemble.pm (from 
libregexp-assemble-perl package)



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org