From: Lupe Christoph Date: Fri, 11 Aug 2000 00:30:27 +0000 (+0200) Subject: Change the regx compilation error markers to use = instead of < X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5aa4340e488ca15127d8181ea8476af4d9a9a491;p=p5sagit%2Fp5-mst-13.2.git Change the regx compilation error markers to use = instead of < since pod makes using the latter quite messy. Reported in ID 20000814.006 by Abigail and in Subject: Unknown escape E<> ? Message-ID: <20000811003027.F17420@alanya.lupe-christoph.de> p4raw-id: //depot/perl@6653 --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 70daac2..11580f7 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -557,10 +557,10 @@ C<-i.bak>, or some such. characters and Perl was unable to create a unique filename during inplace editing with the B<-i> switch. The file was ignored. -=item Can't do {n,m} with n > m at m at ===HERE=== in regex m/%s/ (F) Minima must be less than or equal to maxima. If you really want your -regexp to match something 0 times, just put {0}. The . =item Can't do setegid! @@ -1379,10 +1379,10 @@ some time before now. Check your logic flow. flock() operates on filehandles. Are you attempting to call flock() on a dirhandle by the same name? -=item Quantifier follows nothing at . =item Format not terminated @@ -1629,10 +1629,10 @@ transparently promotes all numbers to a floating point representation internally--subject to loss of precision errors in subsequent operations. -=item Internal disaster at ). Somehow, this count has become scrambled, so Perl is making a guess and treating this C as a request to terminate the Perl script and execute the specified command. -=item Internal urp at . -=item Lookbehind longer than %d not implemented at , C<+?>, and @@ -2704,13 +2704,13 @@ in L. (S unsafe) The subroutine being declared or defined had previously been declared or defined with a different function prototype. -=item Quantifier in {,} bigger than %d at . -=item Quantifier unexpected on zero-length expression at in your regular expression, but there are not at least seven sets of capturing parentheses in the expression. If you wanted to have the character with value 7 inserted into the regular expression, prepend a zero to make the number at least two digits: C<\07> -The . @@ -2901,16 +2901,16 @@ L. (F) If the contents of a (?{...}) clause contains braces, they must balance for Perl to properly detect the end of the clause. See L. -=item Sequence (?%s...) not implemented at . -=item Sequence (?%s...) not recognized at . @@ -3098,7 +3098,7 @@ assignment or as a subroutine argument for example). (F) Your Perl was compiled with B<-D>SETUID_SCRIPTS_ARE_SECURE_NOW, but a version of the setuid emulator somehow got run anyway. -=item Switch (?(condition)... contains too many branches at . -=item Switch condition not recognized at . =item switching effective %s is not implemented @@ -3391,7 +3391,7 @@ representative, who probably put it there in the first place. (F) There are no byte-swapping functions for a machine with this byte order. -=item Unknown switch condition (?(%.2s at . =item Unknown open() mode '%s' @@ -3415,14 +3415,14 @@ iterating over it, and someone else stuck a message in the stream of data Perl expected. Someone's very confused, or perhaps trying to subvert Perl's population of %ENV for nefarious purposes. -=item unmatched [ at . The . The ===HERE=== shows in the regular expression about where the escape was discovered. -=item unmatched ( in regexp at -delimited regular expression. The character was understood -literally. The syntax. When inner anonymous subs that reference variables in outer subroutines are called or referenced, they are automatically rebound to the current values of such variables. -=item Variable length lookbehind not implemented at line 49. -a[ - c - Unmatched [ at line 50. +a[b-a] - c - Invalid [] range "b-a" at =HERE= mark in regex m/a[b-a ===HERE=== ]/ +a[]b - c - Unmatched [ at =HERE= mark in regex m/a[ ===HERE=== ]b/ at (eval 96) line 1, line 49. +a[ - c - Unmatched [ at =HERE= mark in regex m/a[ ===HERE=== / at (eval 97) line 1, line 50. a] a] y $& a] a[]]b a]b y $& a]b a[^bc]d aed y $& aed @@ -95,21 +95,21 @@ a[\S]b a-b y - - ab|cd abc y $& ab ab|cd abcd y $& ab ()ef def y $&-$1 ef- -*a - c - Quantifier follows nothing at line 98. -(*)b - c - Quantifier follows nothing at line 99. +*a - c - Quantifier follows nothing at =HERE= mark in regex m/* ===HERE=== a/ at (eval 192) line 1, line 98. +(*)b - c - Quantifier follows nothing at =HERE= mark in regex m/(* ===HERE=== )b/ at (eval 193) line 1, line 99. $b b n - - a\ - c - Search pattern not terminated a\(b a(b y $&-$1 a(b- a\(*b ab y $& ab a\(*b a((b y $& a((b a\\b a\b y $& a\b -abc) - c - Unmatched ) at line 106. -(abc - c - Unmatched ( at line 107. +abc) - c - Unmatched ) at =HERE= mark in regex m/abc) ===HERE=== / at (eval 205) line 1, line 106. +(abc - c - Unmatched ( at =HERE= mark in regex m/( ===HERE=== abc/ at (eval 206) line 1, line 107. ((a)) abc y $&-$1-$2 a-a-a (a)b(c) abc y $&-$1-$2 abc-a-c a+b+c aabbabc y $& abc a{1,}b{1,}c aabbabc y $& abc -a** - c - Nested quantifiers at line 112. +a** - c - Nested quantifiers at =HERE= mark in regex m/a** ===HERE=== / at (eval 215) line 1, line 112. a.+?c abcabc y $& abc (a+|b)* ab y $&-$1 ab-b (a+|b){0,} ab y $&-$1 ab-b @@ -117,7 +117,7 @@ a.+?c abcabc y $& abc (a+|b){1,} ab y $&-$1 ab-b (a+|b)? ab y $&-$1 a-a (a+|b){0,1} ab y $&-$1 a-a -)( - c - Unmatched ) at line 120. +)( - c - Unmatched ) at =HERE= mark in regex m/) ===HERE=== (/ at (eval 230) line 1, line 120. [^ab]* cde y $& cde abc n - - a* y $& @@ -218,9 +218,9 @@ a[-]?c ac y $& ac 'a[b-d]'i AAC y $& AC 'a[-b]'i A- y $& A- 'a[b-]'i A- y $& A- -'a[b-a]'i - c - Invalid [] range "b-a" at line 222. -'a['i - c - Unmatched [ at line 223. +'a[b-a]'i - c - Invalid [] range "b-a" at =HERE= mark in regex m/a[b-a ===HERE=== ]/ +'a[]b'i - c - Unmatched [ at =HERE= mark in regex m/a[ ===HERE=== ]b/ at (eval 431) line 1, line 222. +'a['i - c - Unmatched [ at =HERE= mark in regex m/a[ ===HERE=== / at (eval 432) line 1, line 223. 'a]'i A] y $& A] 'a[]]b'i A]B y $& A]B 'a[^bc]d'i AED y $& AED @@ -232,21 +232,21 @@ a[-]?c ac y $& ac 'ab|cd'i ABC y $& AB 'ab|cd'i ABCD y $& AB '()ef'i DEF y $&-$1 EF- -'*a'i - c - Quantifier follows nothing at line 235. -'(*)b'i - c - Quantifier follows nothing at line 236. +'*a'i - c - Quantifier follows nothing at =HERE= mark in regex m/* ===HERE=== a/ at (eval 455) line 1, line 235. +'(*)b'i - c - Quantifier follows nothing at =HERE= mark in regex m/(* ===HERE=== )b/ at (eval 456) line 1, line 236. '$b'i B n - - 'a\'i - c - Search pattern not terminated 'a\(b'i A(B y $&-$1 A(B- 'a\(*b'i AB y $& AB 'a\(*b'i A((B y $& A((B 'a\\b'i A\B y $& A\B -'abc)'i - c - Unmatched ) at line 243. -'(abc'i - c - Unmatched ( at line 244. +'abc)'i - c - Unmatched ) at =HERE= mark in regex m/abc) ===HERE=== / at (eval 468) line 1, line 243. +'(abc'i - c - Unmatched ( at =HERE= mark in regex m/( ===HERE=== abc/ at (eval 469) line 1, line 244. '((a))'i ABC y $&-$1-$2 A-A-A '(a)b(c)'i ABC y $&-$1-$2 ABC-A-C 'a+b+c'i AABBABC y $& ABC 'a{1,}b{1,}c'i AABBABC y $& ABC -'a**'i - c - Nested quantifiers at line 249. +'a**'i - c - Nested quantifiers at =HERE= mark in regex m/a** ===HERE=== / at (eval 478) line 1, line 249. 'a.+?c'i ABCABC y $& ABC 'a.*?c'i ABCABC y $& ABC 'a.{0,5}?c'i ABCABC y $& ABC @@ -257,7 +257,7 @@ a[-]?c ac y $& ac '(a+|b)?'i AB y $&-$1 A-A '(a+|b){0,1}'i AB y $&-$1 A-A '(a+|b){0,1}?'i AB y $&-$1 - -')('i - c - Unmatched ) at line 260. +')('i - c - Unmatched ) at =HERE= mark in regex m/) ===HERE=== (/ at (eval 499) line 1, line 260. '[^ab]*'i CDE y $& CDE 'abc'i n - - 'a*'i y $& @@ -346,7 +346,7 @@ a(?:b|(c|e){1,2}?|d)+?(.) ace y $1$2 ce (? line 400. -a(?{{})b - c - Sequence (?{...}) not terminated or not {}-balanced at line 401. +a(?{)b - c - Sequence (?{...}) not terminated or not {}-balanced at =HERE= mark in regex m/a(?{ ===HERE=== )b/ at (eval 780) line 1, line 400. +a(?{{})b - c - Sequence (?{...}) not terminated or not {}-balanced at =HERE= mark in regex m/a(?{ ===HERE=== {})b/ at (eval 781) line 1, line 401. a(?{}})b - c - -a(?{"{"})b - c - Sequence (?{...}) not terminated or not {}-balanced at line 403. +a(?{"{"})b - c - Sequence (?{...}) not terminated or not {}-balanced at =HERE= mark in regex m/a(?{ ===HERE=== "{"})b/ at (eval 783) line 1, line 403. a(?{"\{"})b cabd y $& ab a(?{"{"}})b - c - Unmatched right curly bracket a(?{$bl="\{"}).b caxbd y $bl { @@ -441,7 +441,7 @@ x(~~)*(?:(?:F)?)? x~~ y - - ^(\(+)?blah(?(1)(\)))$ blah y ($2) () ^(\(+)?blah(?(1)(\)))$ blah) n - - ^(\(+)?blah(?(1)(\)))$ (blah n - - -(?(1?)a|b) a c - Switch condition not recognized at line 444. +(?(1?)a|b) a c - Switch condition not recognized at =HERE= mark in regex m/(?(1? ===HERE=== )a|b)/ at (eval 868) line 1, line 444. (?(1)a|b|c) a c - Switch (?(condition)... contains too many branches (?(?{0})a|b) a n - - (?(?{0})b|a) a y $& a @@ -473,10 +473,10 @@ $(?<=^(a)) a y $1 a ([[:]+) a:[b]: y $1 :[ ([[=]+) a=[b]= y $1 =[ ([[.]+) a.[b]. y $1 .[ -[a[:xyz: - c - Unmatched [ at line 476. -[a[:xyz:] - c - POSIX class [:xyz:] unknown at line 476. +[a[:xyz:] - c - POSIX class [:xyz:] unknown at =HERE= mark in regex m/[a[:xyz:] ===HERE=== / [a[:]b[:c] abc y $& abc -([a[:xyz:]b]+) pbaq c - POSIX class [:xyz:] unknown at a+)b) aaab y $1 aaab (?>(a+))b aaab y $1 aaa ((?>[^()]+)|\([^()]*\))+ ((abc(ade)ufh()()x y $& abc(ade)ufh()()x diff --git a/t/op/regmesg.t b/t/op/regmesg.t index 4a67bbb..2aaca5c 100644 --- a/t/op/regmesg.t +++ b/t/op/regmesg.t @@ -13,8 +13,8 @@ my $debug = 1; ## arrays below. The {#} is a meta-marker -- it marks where the marker should ## go. -my $marker1 = " 3 } @@ -61,9 +61,9 @@ no warnings 'regexp' ; /[:zog:]/; /[[:zog:]]/; EXPECT -POSIX syntax [: :] belongs inside character classes at 3 } @@ -73,8 +73,8 @@ $_ = "" ; no warnings 'regexp' ; /[.zog.]/; EXPECT -POSIX syntax [. .] belongs inside character classes at 3 } @@ -84,7 +84,7 @@ $_ = "" ; no warnings 'regexp' ; /[[.zog.]]/; EXPECT -POSIX syntax [. .] is reserved for future extensions at