r63022 - in /trunk/libregexp-grammars-perl: Changes MANIFEST META.yml README debian/changelog demo/demo_LaTeXish_dump.pl lib/Regexp/Grammars.pm t/repop_ws.t t/top_is_token.t

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Tue Sep 28 12:20:43 UTC 2010


Author: carnil-guest
Date: Tue Sep 28 12:20:28 2010
New Revision: 63022

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=63022
Log:
New upstream release

Added:
    trunk/libregexp-grammars-perl/t/repop_ws.t
      - copied unchanged from r63021, branches/upstream/libregexp-grammars-perl/current/t/repop_ws.t
    trunk/libregexp-grammars-perl/t/top_is_token.t
      - copied unchanged from r63021, branches/upstream/libregexp-grammars-perl/current/t/top_is_token.t
Modified:
    trunk/libregexp-grammars-perl/Changes
    trunk/libregexp-grammars-perl/MANIFEST
    trunk/libregexp-grammars-perl/META.yml
    trunk/libregexp-grammars-perl/README
    trunk/libregexp-grammars-perl/debian/changelog
    trunk/libregexp-grammars-perl/demo/demo_LaTeXish_dump.pl
    trunk/libregexp-grammars-perl/lib/Regexp/Grammars.pm

Modified: trunk/libregexp-grammars-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-grammars-perl/Changes?rev=63022&op=diff
==============================================================================
--- trunk/libregexp-grammars-perl/Changes (original)
+++ trunk/libregexp-grammars-perl/Changes Tue Sep 28 12:20:28 2010
@@ -115,3 +115,16 @@
 
     * Rerelease to remove spurious dependencies on Data::Show
       (thanks Salvatore!)
+
+
+
+1.010  Tue Sep 28 08:03:42 2010
+
+    * Added documentation warning about non-reentrancy of Perl 5 regex engine
+      (thanks Andrew).
+
+    * Fixed behaviour of ** repetitions wrt whitespace (thanks Andrew)
+
+    * Documented more explicitly that start-pattern is supposed to act
+      like a regular regex (or a token) wrt to whitespace
+

Modified: trunk/libregexp-grammars-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-grammars-perl/MANIFEST?rev=63022&op=diff
==============================================================================
--- trunk/libregexp-grammars-perl/MANIFEST (original)
+++ trunk/libregexp-grammars-perl/MANIFEST Tue Sep 28 12:20:28 2010
@@ -53,4 +53,6 @@
 t/local_ws.t
 t/matchline.t
 t/matchpos.t
+t/repop_ws.t
+t/top_is_token.t
 META.yml                                 Module meta-data (added by MakeMaker)

Modified: trunk/libregexp-grammars-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-grammars-perl/META.yml?rev=63022&op=diff
==============================================================================
--- trunk/libregexp-grammars-perl/META.yml (original)
+++ trunk/libregexp-grammars-perl/META.yml Tue Sep 28 12:20:28 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Regexp-Grammars
-version:             1.009
+version:             1.010
 abstract:            Add grammatical parsing features to Perl 5.10 regexes
 license:             ~
 author:              

Modified: trunk/libregexp-grammars-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-grammars-perl/README?rev=63022&op=diff
==============================================================================
--- trunk/libregexp-grammars-perl/README (original)
+++ trunk/libregexp-grammars-perl/README Tue Sep 28 12:20:28 2010
@@ -1,4 +1,4 @@
-Regexp::Grammars version 1.009
+Regexp::Grammars version 1.010
 
 This module adds a small number of new regex constructs that can be used
 within Perl 5.10 patterns to implement complete recursive-descent parsing.

Modified: trunk/libregexp-grammars-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-grammars-perl/debian/changelog?rev=63022&op=diff
==============================================================================
--- trunk/libregexp-grammars-perl/debian/changelog (original)
+++ trunk/libregexp-grammars-perl/debian/changelog Tue Sep 28 12:20:28 2010
@@ -1,3 +1,9 @@
+libregexp-grammars-perl (1.010-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>  Tue, 28 Sep 2010 14:14:21 +0200
+
 libregexp-grammars-perl (1.009-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/libregexp-grammars-perl/demo/demo_LaTeXish_dump.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-grammars-perl/demo/demo_LaTeXish_dump.pl?rev=63022&op=diff
==============================================================================
--- trunk/libregexp-grammars-perl/demo/demo_LaTeXish_dump.pl (original)
+++ trunk/libregexp-grammars-perl/demo/demo_LaTeXish_dump.pl Tue Sep 28 12:20:28 2010
@@ -73,8 +73,8 @@
 
 my $input = do{ local $/; <DATA>};
 if ($input =~ $parser) {
-    use Data::Dump 'dump';
-    warn dump [ \%/ ];
+    use Data::Dumper 'Dumper';
+    warn Dumper [ \%/ ];
 }
 
 

Modified: trunk/libregexp-grammars-perl/lib/Regexp/Grammars.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libregexp-grammars-perl/lib/Regexp/Grammars.pm?rev=63022&op=diff
==============================================================================
--- trunk/libregexp-grammars-perl/lib/Regexp/Grammars.pm (original)
+++ trunk/libregexp-grammars-perl/lib/Regexp/Grammars.pm Tue Sep 28 12:20:28 2010
@@ -7,7 +7,7 @@
 use Scalar::Util qw< blessed >;
 use Data::Dumper qw< Dumper  >;
 
-our $VERSION = '1.009';
+our $VERSION = '1.010';
 
 # Load the module...
 sub import {
@@ -1218,6 +1218,7 @@
         $post_match_debug,
         $rule_name,
         $subrule_names_ref,
+        $magic_ws,
     ) = @_;
 
     # Remember the preceding construct, so as to implement the ** operator...
@@ -1545,7 +1546,7 @@
 
         # Handle the ** operator...
         if ($+{list_marker}) {
-            my $ws = $+{ws1} . $+{ws2};
+            my $ws = $magic_ws ? $+{ws1} . $+{ws2} : q{};
 
             $curr_translation = _translate_separated_list(
                 $prev_construct,   $curr_construct,
@@ -1916,6 +1917,7 @@
             $post_match_debug,
             q{},                        # Expected...what?
             \%subrule_names,
+            0                           # Whitespace isn't magical
         );
 
         # Report how construct was interpreted, if requested to...
@@ -1956,6 +1958,7 @@
             $post_match_debug,
             $callname,                # Expected...what?
             \%subrule_names,
+            $type eq 'rule',          # Is whitespace magical?
         );
 
         # Report how construct was interpreted, if requested to...
@@ -2065,7 +2068,7 @@
 
 =head1 VERSION
 
-This document describes Regexp::Grammars version 1.009
+This document describes Regexp::Grammars version 1.010
 
 
 =head1 SYNOPSIS
@@ -2428,8 +2431,13 @@
     }xms;
 
 The start-pattern at the beginning of the grammar acts like the
-"top" rule of the grammar, and must be matched completely for the
+"top" token of the grammar, and must be matched completely for the
 grammar to match.
+
+This pattern is treated like a token for whitespace
+matching behaviour (see L<"Tokens vs rules (whitespace handling)">).
+That is, whitespace in the start-pattern is treated like whitespace
+in any normal Perl regex.
 
 The rules and tokens are declarations only and they are not directly matched.
 Instead, they act like subroutines, and are invoked by name from the
@@ -5212,6 +5220,21 @@
 
 =item *
 
+The Perl 5 regex engine is not reentrant. So any attempt to perform
+a regex match inside a C<(?{ ... })> or C<(??{ ... })> will almost
+certainly lead to either weird data corruption or a segfault.
+
+The same calamities can also occur in any constructor called by 
+C<< <objrule:> >>. If the constructor invokes another regex in any
+way, it will most likely fail catastrophically. In particular, this
+means that Moose constructors will frequently crash and burn within
+a Regex::Grammars grammar (for example, if the Moose-based class
+declares an attribute type constraint such as 'Int', which Moose
+checks using a regex).
+
+
+=item *
+
 The additional regex constructs this module provides are implemented by
 rewriting regular expressions. This is a (safer) form of source
 filtering, but still subject to all the same limitations and




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