[svn:perl6-synopsis] r14438 - doc/trunk/design/syn

2007-08-29 Thread larry
Author: larry
Date: Wed Aug 29 03:12:28 2007
New Revision: 14438

Modified:
   doc/trunk/design/syn/S03.pod

Log:
Precedence of ff and fff changed to be the same as ??!!


Modified: doc/trunk/design/syn/S03.pod
==
--- doc/trunk/design/syn/S03.pod(original)
+++ doc/trunk/design/syn/S03.podWed Aug 29 03:12:28 2007
@@ -38,11 +38,11 @@
 Junctive and (all)  &
 Junctive or (any)   | ^
 Named unary rand sleep abs
-Nonchaining infix   but does <=> leg cmp .. ..^ ^.. ^..^ ff fff
+Nonchaining infix   but does <=> leg cmp .. ..^ ^.. ^..^
 Chaining infix  != == < <= > >= eq ne lt le gt ge ~~ === eqv !eqv
 Tight and   &&
 Tight or|| ^^ // min max
-Conditional ?? !!
+Conditional ?? !! ff fff
 Item assignment = := ::= => += -= **= xx= .=
 Loose unary true not
 Comma operator  ,


[svn:perl6-synopsis] r14439 - doc/trunk/design/syn

2007-08-29 Thread larry
Author: larry
Date: Wed Aug 29 03:14:08 2007
New Revision: 14439

Modified:
   doc/trunk/design/syn/S03.pod

Log:
Forgot to move description of ff too.


Modified: doc/trunk/design/syn/S03.pod
==
--- doc/trunk/design/syn/S03.pod(original)
+++ doc/trunk/design/syn/S03.podWed Aug 29 03:14:08 2007
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 8 Mar 2004
-  Last Modified: 2 Aug 2007
+  Last Modified: 29 Aug 2007
   Number: 3
-  Version: 118
+  Version: 119
 
 =head1 Overview
 
@@ -864,24 +864,6 @@
 Constructs Range objects, optionally excluding one or both endpoints.
 See L.
 
-=item *
-
-Flipflop ranges
-
-start() ff end()
-start() ^ff end()
-start() ff^ end()
-start() ^ff^ end()
-
-=item *
-
-Flipflop ranges (sed style)
-
-start() fff end()
-start() ^fff end()
-start() fff^ end()
-start() ^fff^ end()
-
 =back
 
 =head2 Chaining binary precedence
@@ -1108,6 +1090,24 @@
 (including Perl 5), a bare question mark in infix position will
 produce an error suggesting that the user use C instead.
 
+=item *
+
+Flipflop ranges
+
+start() ff end()
+start() ^ff end()
+start() ff^ end()
+start() ^ff^ end()
+
+=item *
+
+Flipflop ranges (sed style)
+
+start() fff end()
+start() ^fff end()
+start() fff^ end()
+start() ^fff^ end()
+
 =back
 
 =head2 Item assignment precedence


[svn:perl6-synopsis] r14440 - doc/trunk/design/syn

2007-08-29 Thread larry
Author: larry
Date: Wed Aug 29 03:15:06 2007
New Revision: 14440

Modified:
   doc/trunk/design/syn/S02.pod

Log:
Block comments removed in favor of simple syntax error in case of ambiguity


Modified: doc/trunk/design/syn/S02.pod
==
--- doc/trunk/design/syn/S02.pod(original)
+++ doc/trunk/design/syn/S02.podWed Aug 29 03:15:06 2007
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 10 Aug 2004
-  Last Modified: 13 Jun 2007
+  Last Modified: 29 Aug 2007
   Number: 2
-  Version: 112
+  Version: 113
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -147,51 +147,48 @@
 (There may be the I of space for some double-wide
 characters, however, such as the corner quotes above.)
 
-An embedded comment is not allowed as the first thing on the line since it
-would instead be parsed as a block comment, as described next.
+An embedded comment is not allowed as the first thing on the line.
 
-=item *
-
-Unlike embedded comments, which are character-oriented, block comments
-are line-oriented.  To facilitate the common practice of commenting out
-sections of code by prefixing each line with C<#>, if the initial C<#>
-on the line is immediately followed by one or more opening brackets,
-it is treated as a line-oriented form of bracket quoting, and may
-be terminated I by a line matching the corresponding close
-bracket, which (unlike embedded comments) must also be prefixed with
-an initial C<#>.  For example, a opening line matching
-
-/^^ '#{' \s /
-
-it may be terminated I by a line matching
-
-/^^ '#}' \s /
-
-The entire final line counts as part of the comment.  It does
-not matter whether the intervening lines start with C<#> or not.
-Block comments may be nested within other block comments (with the
-same or differing brackets).  POD comments may also be nested within
-block comments.  (These are still visible to the POD parser; if you
-wish to comment out a block of mixed POD and Perl 6 code, either use a
-POD comment around it all, or prefix every line with C<#>.)  The parser
-must report mismatched openers or closers to prevent, for example,
-unwitting use of bare C<}> as a closer for an opening C<#{>.
-
-However, an unexpected closer is treated as a line-end comment, on the
-assumption that the opening bracket was at the end of its comment line
-in the K&R style:
-
-#for @foo {
-# ...
+#sub foo# line-end comment
+#{  # ILLEGAL, syntax error
+#   ...
 #}
 
-In addition to supporting the practice of commenting out code with
-line comments, an additional motivation for this is to promote human
-recognition of the end of the comment when the opener could be quite
-far away, without requiring that all intervening lines use C comments.
-Also, using the ordinary embedded comment mechanism tends to be fragile
-in the face of strings containing bracket characters, and the probability
-of such bracket skew increases with the length of the commented code.
+If you wish to have a comment there, you must disambiguate it to
+either an embedded comment or a line-end comment.  You can put a
+space in front of it to make it an embedded comment:
+
+#sub foo# line end comment
+ #{ # okay, comment
+   ...  # extends
+}   # to here
+
+Or you can put something other than a single C<#>
+to make it a line-end comment.  Therefore, if you are commenting out a
+block of code using the line-comment form, we recommend that you use
+C<##>, or C<#> followed by some whitespace, preferably a tab to keep
+any tab formatting consistent:
+
+##sub foo
+##{ # okay
+##   ...
+##}
+
+# sub foo
+# { # okay
+#...
+# }
+
+
+#   sub foo
+#   {   # okay
+#  ...
+#   }
+
+However, it's often better to use pod comments because they are
+implicitly line-oriented.  And if you have an intelligent syntax
+highlighter that will mark pod comments in a different color, there's
+less visual need for a C<#> on every line.
 
 =item *
 


[svn:perl6-synopsis] r14441 - doc/trunk/design/syn

2007-08-29 Thread larry
Author: larry
Date: Wed Aug 29 03:57:51 2007
New Revision: 14441

Modified:
   doc/trunk/design/syn/S02.pod

Log:
Clarification of Ps/Pe vs Bidi requested by sunnavy++


Modified: doc/trunk/design/syn/S02.pod
==
--- doc/trunk/design/syn/S02.pod(original)
+++ doc/trunk/design/syn/S02.podWed Aug 29 03:57:51 2007
@@ -14,7 +14,7 @@
   Date: 10 Aug 2004
   Last Modified: 29 Aug 2007
   Number: 2
-  Version: 113
+  Version: 114
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -80,11 +80,16 @@
 as opening brackets.  This includes the second section of the Unicode
 BidiMirroring data table, as well as C and C.
 
-If a character is already used in Ps/Pe mappings, then its entry in
-BidiMirroring is ignored.  Therefore C maps to C,
-not C, and C itself is not a valid bracket opener.
+If a character is already used in Ps/Pe mappings, then any entry
+in BidiMirroring is ignored (both forward and backward mappings).
+For any given Ps character, the next Pe codepoint (in numerical
+order) is assumed to be its matching character even if that is not
+what you might guess using left-right symmetry.  Therefore C
+maps to C, not C, and C maps to C,
+not C.  Neither C nor C are valid bracket
+openers, despite having reverse mappings in the BidiMirroring table.
 
-The C has two closing alternatives, C and C;
+The C codepoint has two closing alternatives, C and C;
 PerlĀ 6 only recognizes the one with lower code point number, C,
 as the closing brace.  This policy also applies to new one-to-many
 mappings introduced in the future.