Author: lwall
Date: 2009-11-07 02:35:01 +0100 (Sat, 07 Nov 2009)
New Revision: 29014

[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,

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl6-language @
postedNov 7, '09 at 1:35a
activeNov 7, '09 at 1:35a

1 user in discussion

Pugs-commits: 1 post



site design / logo © 2021 Grokbase