r43148 - in /trunk/libparse-recdescent-perl: Changes MANIFEST META.yml README debian/changelog lib/Parse/RecDescent.pm t/basics.t t/re_capture_return.t t/separated_repetition.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Fri Aug 28 14:39:23 UTC 2009


Author: jawnsy-guest
Date: Fri Aug 28 14:39:17 2009
New Revision: 43148

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=43148
Log:
* New upstream release
  + Fixes regression caused by removal of $&

Added:
    trunk/libparse-recdescent-perl/t/re_capture_return.t
      - copied unchanged from r43147, branches/upstream/libparse-recdescent-perl/current/t/re_capture_return.t
    trunk/libparse-recdescent-perl/t/separated_repetition.t
      - copied unchanged from r43147, branches/upstream/libparse-recdescent-perl/current/t/separated_repetition.t
Modified:
    trunk/libparse-recdescent-perl/Changes
    trunk/libparse-recdescent-perl/MANIFEST
    trunk/libparse-recdescent-perl/META.yml
    trunk/libparse-recdescent-perl/README
    trunk/libparse-recdescent-perl/debian/changelog
    trunk/libparse-recdescent-perl/lib/Parse/RecDescent.pm
    trunk/libparse-recdescent-perl/t/basics.t

Modified: trunk/libparse-recdescent-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-recdescent-perl/Changes?rev=43148&op=diff
==============================================================================
--- trunk/libparse-recdescent-perl/Changes (original)
+++ trunk/libparse-recdescent-perl/Changes Fri Aug 28 14:39:17 2009
@@ -566,3 +566,12 @@
     - Remove all occurrences of $& so we don't affect other regular expressions.
 
     - Perl 5.6.0 required for use of $+[0] and $-[0] for replacement of $&.
+
+
+1.962.1  Thu Aug 27 21:39:30 2009
+
+    - Fixed subtle bug in leftop and rightop caused by removal of $&
+
+
+1.962.2  Fri Aug 28 13:39:33 2009
+

Modified: trunk/libparse-recdescent-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-recdescent-perl/MANIFEST?rev=43148&op=diff
==============================================================================
--- trunk/libparse-recdescent-perl/MANIFEST (original)
+++ trunk/libparse-recdescent-perl/MANIFEST Fri Aug 28 14:39:17 2009
@@ -73,3 +73,5 @@
 demo/demo_undumper.pl
 demo/demo_whoson.pl
 t/basics.t
+t/re_capture_return.t
+t/separated_repetition.t

Modified: trunk/libparse-recdescent-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-recdescent-perl/META.yml?rev=43148&op=diff
==============================================================================
--- trunk/libparse-recdescent-perl/META.yml (original)
+++ trunk/libparse-recdescent-perl/META.yml Fri Aug 28 14:39:17 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Parse-RecDescent
-version:             1.962.0
+version:             1.962.2
 abstract:            Generate Recursive-Descent Parsers
 license:             ~
 author:              

Modified: trunk/libparse-recdescent-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-recdescent-perl/README?rev=43148&op=diff
==============================================================================
--- trunk/libparse-recdescent-perl/README (original)
+++ trunk/libparse-recdescent-perl/README Fri Aug 28 14:39:17 2009
@@ -1,4 +1,4 @@
-Parse::RecDescent version 1.962.0
+Parse::RecDescent version 1.962.2
 
 NAME
 

Modified: trunk/libparse-recdescent-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-recdescent-perl/debian/changelog?rev=43148&op=diff
==============================================================================
--- trunk/libparse-recdescent-perl/debian/changelog (original)
+++ trunk/libparse-recdescent-perl/debian/changelog Fri Aug 28 14:39:17 2009
@@ -1,3 +1,10 @@
+libparse-recdescent-perl (1.962.2+dfsg-1) UNRELEASED; urgency=low
+
+  * New upstream release
+    + Fixes regression caused by removal of $&
+
+ -- Jonathan Yu <frequency at cpan.org>  Fri, 28 Aug 2009 06:36:47 -0400
+
 libparse-recdescent-perl (1.962.0+dfsg-1) unstable; urgency=low
 
   [ Jonathan Yu ]

Modified: trunk/libparse-recdescent-perl/lib/Parse/RecDescent.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-recdescent-perl/lib/Parse/RecDescent.pm?rev=43148&op=diff
==============================================================================
--- trunk/libparse-recdescent-perl/lib/Parse/RecDescent.pm (original)
+++ trunk/libparse-recdescent-perl/lib/Parse/RecDescent.pm Fri Aug 28 14:39:17 2009
@@ -1130,8 +1130,7 @@
         ' . ($self->{"lookahead"}<0?'if':'unless')
         . ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and '
         . ($check->{itempos}? 'do {'.Parse::RecDescent::Production::incitempos().' 1} and ' : '')
-        . '  $text =~ s' . $ldel . '(\A(?:' . $self->{"pattern"} . '))'
-                 . $rdel . $sdel . $mod . ')
+        . '  $text =~ m' . $ldel . '\A(?:' . $self->{"pattern"} . ')' . $rdel . $mod . ')
         {
             '.($self->{"lookahead"} ? '$text = $_savetext;' : '').'
             $expectation->failed();
@@ -1141,7 +1140,8 @@
 
             last;
         }
-        $current_match = $1;
+		$current_match = substr($text, $-[0], $+[0] - $-[0]);
+        substr($text,0,length($current_match),q{});
         Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
                         . $current_match . q{])},
                           Parse::RecDescent::_tracefirst($text))
@@ -1203,7 +1203,7 @@
         ' . ($self->{"lookahead"}<0?'if':'unless')
         . ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and '
         . ($check->{itempos}? 'do {'.Parse::RecDescent::Production::incitempos().' 1} and ' : '')
-        . '  $text =~ s/(\A' . quotemeta($self->{"pattern"}) . ')//)
+        . '  $text =~ m/\A' . quotemeta($self->{"pattern"}) . '/)
         {
             '.($self->{"lookahead"} ? '$text = $_savetext;' : '').'
             $expectation->failed();
@@ -1212,7 +1212,8 @@
                             if defined $::RD_TRACE;
             last;
         }
-        $current_match = $1;
+		$current_match = substr($text, $-[0], $+[0] - $-[0]);
+        substr($text,0,length($current_match),q{});
         Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
                         . $current_match . q{])},
                           Parse::RecDescent::_tracefirst($text))
@@ -1593,7 +1594,7 @@
             ' . $op->code(@_[1..2]) . '
             ' . ($op->isterminal() ? 'pop @item;' : '$backtrack=1;' ) . '
             ' . (ref($op) eq 'Parse::RecDescent::Token'
-                ? 'if (defined $1) {push @item, $item{'.($self->{name}||$self->{hashname}).'}=$1; $backtrack=1;}'
+                ? 'if (defined $2) {push @item, $item{'.($self->{name}||$self->{hashname}).'}=$2; $backtrack=1;}'
                 : "" ) . '
             ' . $rightarg->code(@_[1..2]) . '
             $savetext = $text;
@@ -1619,7 +1620,7 @@
             ' . $op->code(@_[1..2]) . '
             $savetext = $text;
             ' . ($op->isterminal() ? 'pop @item;' : "" ) . '
-            ' . (ref($op) eq 'Parse::RecDescent::Token' ? 'do { push @item, $item{'.($self->{name}||$self->{hashname}).'}=$1; } if defined $1;' : "" ) . '
+            ' . (ref($op) eq 'Parse::RecDescent::Token' ? 'do { push @item, $item{'.($self->{name}||$self->{hashname}).'}=$2; } if defined $2;' : "" ) . '
           }
           $text = $savetext;
           pop @item if $backtrack;
@@ -1722,7 +1723,7 @@
 
 my $ERRORS = 0;
 
-use version; our $VERSION = qv('1.962.0');
+use version; our $VERSION = qv('1.962.2');
 
 # BUILDING A PARSER
 
@@ -3381,7 +3382,7 @@
 to an array containing the values matched by each call to the individual
 subrule "statement".
 
-Repetition modifieres may include a separator pattern:
+Repetition modifiers may include a separator pattern:
 
     program: statement(s /;/)
 
@@ -5966,6 +5967,25 @@
 
 =back
 
+=head1 SUPPORT
+
+=head2 Mailing List
+
+Visit L<http://www.perlfoundation.org/perl5/index.cgi?parse_recdescent> to sign up for the mailing list.
+
+L<http://www.PerlMonks.org> is also a good place to ask questions.
+
+=head2 FAQ
+
+Visit L<Parse::RecDescent::FAQ> for answers to frequently (and not so
+frequently) asked questions about Parse::RecDescent
+
+=head1 SEE ALSO
+
+L<Regexp::Grammars> provides Parse::RecDescent style parsing using native
+Perl 5.10 regular expressions.
+
+
 =head1 LICENCE AND COPYRIGHT
 
 Copyright (c) 1997-2007, Damian Conway C<< <DCONWAY at CPAN.org> >>. All rights

Modified: trunk/libparse-recdescent-perl/t/basics.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-recdescent-perl/t/basics.t?rev=43148&op=diff
==============================================================================
--- trunk/libparse-recdescent-perl/t/basics.t (original)
+++ trunk/libparse-recdescent-perl/t/basics.t Fri Aug 28 14:39:17 2009
@@ -12,7 +12,7 @@
 $loaded = 1;
 print "ok 1\n";
 
-sub debug { $D || 0 }
+sub debug { $D || $D || 0 }
 
 my $count = 2;
 sub ok($;$)




More information about the Pkg-perl-cvs-commits mailing list