Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

r29014 - docs/Perl6/Spec

0 views
Skip to first unread message

pugs-c...@feather.perl6.nl

unread,
Nov 6, 2009, 8:35:01 PM11/6/09
to perl6-l...@perl.org
Author: lwall
Date: 2009-11-07 02:35:01 +0100 (Sat, 07 Nov 2009)
New Revision: 29014

Modified:
docs/Perl6/Spec/S05-regex.pod
Log:
[S05] remove :panic


Modified: docs/Perl6/Spec/S05-regex.pod
===================================================================
--- docs/Perl6/Spec/S05-regex.pod 2009-11-07 01:10:41 UTC (rev 29013)
+++ docs/Perl6/Spec/S05-regex.pod 2009-11-07 01:35:01 UTC (rev 29014)
@@ -16,8 +16,8 @@

Created: 24 Jun 2002

- Last Modified: 30 Oct 2009
- Version: 107
+ Last Modified: 06 Nov 2009
+ Version: 108

This document summarizes Apocalypse 5, which is about the new regex
syntax. We now try to call them I<regex> rather than "regular
@@ -511,15 +511,6 @@

=item *

-The new C<:panic> modifier causes this regex and all invoked subrules
-to try to backtrack on any rules that would otherwise default to
-not backtracking because they have C<:ratchet> set. Never panic
-unless you're desperate and want the pattern matcher to do a lot of
-unnecessary work. If you have an error in your grammar, it's almost
-certainly a bad idea to fix it by backtracking.
-
-=item *
-
The C<:i>, C<:s>, C<:Perl5>, and Unicode-level modifiers can be
placed inside the regex (and are lexically scoped):

@@ -1937,8 +1928,8 @@
regex ident { [ <alpha>: | _: ]: \w*: }

but rather easier to read. The bare C<*>, C<+>, and C<?> quantifiers
-never backtrack in a C<token> unless some outer regex has specified a
-C<:panic> option that applies. If you want to prevent even that, use
+never backtrack in a C<token>.
+In normal regexes, use
C<*:>, C<+:>, or C<?:> to prevent any backtracking into the quantifier.
If you want to explicitly backtrack, append either a C<?> or a C<!>
to the quantifier. The C<?> forces minimal matching as usual,

0 new messages