Skip Menu |
 

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

Report information
The Basics
Id: 77857
Status: open
Priority: 0/
Queue: Regexp-Grammars

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

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

Attachments


Subject: Bleadperl v5.16.0-225-g2a53d33 shouts at DCONWAY/Regexp-Grammars-1.016.tar.gz
Download (untitled) / with headers
text/plain 304b
Although all tests pass Regexp::Grammars became nearly unusable because of the warnings triggered by bleadperl v5.16.0-225-g2a53d33. That commit introduced mandatory backslash before "{". Attached patch seems to be a solution, at least all tests pass and all warnings during testing are silenced. HTH,
Subject: Regexp-Grammers-1.016-ANDK-01.diff
diff -ur ../Regexp-Grammars-1.016-v3XB0T~/lib/Regexp/Grammars.pm ../Regexp-Grammars-1.016-v3XB0T/lib/Regexp/Grammars.pm --- ../Regexp-Grammars-1.016-v3XB0T~/lib/Regexp/Grammars.pm 2012-03-09 21:01:30.000000000 +0100 +++ ../Regexp-Grammars-1.016-v3XB0T/lib/Regexp/Grammars.pm 2012-06-16 06:02:54.263610470 +0200 @@ -1438,7 +1438,7 @@ my $prev_translation = q{}; # Translate all other calls (MAIN GRAMMAR FOR MODULE)... - $grammar_spec =~ s{ + my $pat = qr; (?<list_marker> (?<ws1> \s*+) (?<op> (?&SEPLIST_OP) ) (?<ws2> \s*+) )? (?<construct> < @@ -1567,7 +1567,7 @@ ) (?(DEFINE) - (?<SEPLIST_OP> \*\* | [*+?][+?]?\s*% | {\d+(,\d*)?}[+?]?\s*% ) + (?<SEPLIST_OP> \*\* | [*+?][+?]?\s*% | \{\d+(,\d*)?}[+?]?\s*% ) (?<PARENS> \( (?:[?]<[=!])? (?: \\. | (?&PARENCODE) | (?&PARENS) | (?&CHARSET) | [^][()\\<>]++ )*+ \) ) (?<BRACES> \{ (?: \\. | (?&BRACES) | [^{}\\]++ )*+ \} ) (?<PARENCODE> \(\?\{ (?: \\. | (?&BRACES) | [^{}\\]++ )*+ \}\) ) @@ -1583,9 +1583,10 @@ (?<ARG> (?&VAR) | (?&KEY) \s* => \s* (?&LITERAL) ) (?<VAR> : (?&IDENT) ) (?<KEY> (?&IDENT) | (?&LITERAL) ) - (?<QUANTIFIER> [*+?][+?]? | {\d+,?\d*}[+?]?i ) + (?<QUANTIFIER> [*+?][+?]? | \{\d+,?\d*}[+?]?i ) ) - }{ + ;xms; + $grammar_spec =~ s{$pat}{ my $curr_construct = $+{construct}; my $alias = ($+{alias}//'MATCH') eq 'MATCH' ? q{'='} : qq{'$+{alias}'}; @@ -1876,7 +1877,7 @@ # Finally, remember this latest translation, and return it... $prev_construct = $curr_construct; $prev_translation = $curr_translation;; - }exmsg; + }eg; # Translate magic hash accesses... $grammar_spec =~ s{\$MATCH (?= \s*\{) } @@ -2386,7 +2387,7 @@ # Report anything that starts like a subrule, but isn't... my %seen = ( '<ws>' => 1, '<hk>' => 1, '<matchpos>' => 1, '<matchline>' => 1); # autogenerated - while ($regex =~ m{( (?<! \(\? | q\{ ) (?<! \\) < [[.]* $IDENT \s* (:?) .*? [\n>] )}gxms) { + while ($regex =~ m;( (?<! \(\? | q\{ ) (?<! \\) < [[.]* $IDENT \s* (:?) .*? [\n>] );gxms) { my $construct = $1; my $something = $2 ? 'directive' : 'subrule call'; diff -ur ../Regexp-Grammars-1.016-v3XB0T~/t/local_ws.t ../Regexp-Grammars-1.016-v3XB0T/t/local_ws.t --- ../Regexp-Grammars-1.016-v3XB0T~/t/local_ws.t 2011-11-01 11:43:21.000000000 +0100 +++ ../Regexp-Grammars-1.016-v3XB0T/t/local_ws.t 2012-06-16 06:08:13.472366025 +0200 @@ -32,7 +32,7 @@ my $test_grammar = do { use Regexp::Grammars; - qr{ + qr! <program> @@ -41,7 +41,7 @@ <[statement]> ** ( ; ) <rule: statement> - <ws: (\s*+ | \#{ .*? }\# )* > # Another type within statements + <ws: (\s*+ | \#\{ .*? }\# )* > # Another type within statements <cmd> <[arg]> ** ( , ) <token: cmd> @@ -49,7 +49,7 @@ <token: arg> baz - }xms; + !xms; }; my $text = q{
RT-Send-CC: public [...] khwilliamson.com
Download (untitled) / with headers
text/plain 207b
Forgot to mention the ticket that was intended to track all affected parties of this change: https://rt.perl.org:443/rt3/Ticket/Display.html?id=113094 Also CC'ing Karl in case he wants to comment. Cheers,
Subject: Re: [rt.cpan.org #77857] Bleadperl v5.16.0-225-g2a53d33 shouts at DCONWAY/Regexp-Grammars-1.016.tar.gz
Date: Sat, 16 Jun 2012 18:03:49 +1000
To: bug-Regexp-Grammars [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Download (untitled) / with headers
text/plain 378b
Show quoted text
> Although all tests pass Regexp::Grammars became nearly unusable because > of the warnings triggered by bleadperl v5.16.0-225-g2a53d33.
Thanks for the patch, Andreas. Much appreciated...and now applied for the next release. Damian PS: Frankly the new behaviour, as currently implemented, is just awful and compromises one of the most useful delimiters for regexes. :-(
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #77857] Bleadperl v5.16.0-225-g2a53d33 shouts at DCONWAY/Regexp-Grammars-1.016.tar.gz
Date: Sat, 16 Jun 2012 12:56:19 +0200
To: bug-Regexp-Grammars [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Download (untitled) / with headers
text/plain 221b
Show quoted text
> PS: Frankly the new behaviour, as currently implemented, is just awful > and compromises one of the most useful delimiters for regexes. :-(
Thank you for the statement, I'm feeling less alone now:) -- andreas
Subject: Re: [rt.cpan.org #77857] Bleadperl v5.16.0-225-g2a53d33 shouts at DCONWAY/Regexp-Grammars-1.016.tar.gz
Date: Sat, 16 Jun 2012 21:10:12 +1000
To: bug-Regexp-Grammars [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Download (untitled) / with headers
text/plain 296b
Show quoted text
>  > PS: Frankly the new behaviour, as currently implemented, is just awful >  >     and compromises one of the most useful delimiters for regexes. :-( > > Thank you for the statement, I'm feeling less alone now:)
Feel free to share my views with anyone whom it might influence. ;-) Damian


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.