Author: lwall Date: 2009-01-16 08:42:00 +0100 (Fri, 16 Jan 2009) New Revision: 24926
Modified: docs/Perl6/Spec/S03-operators.pod src/perl6/STD.pm t/operators/adverbial_modifiers.t t/run/02-dash-n.t t/run/03-dash-p.t Log: [STD] alignment with S03 on associativity noted by mtnviewmark++ [STD] added various missing functions and types [t/spec] remove my() function calls :) Modified: docs/Perl6/Spec/S03-operators.pod =================================================================== --- docs/Perl6/Spec/S03-operators.pod 2009-01-16 06:07:31 UTC (rev 24925) +++ docs/Perl6/Spec/S03-operators.pod 2009-01-16 07:42:00 UTC (rev 24926) @@ -45,7 +45,7 @@ C Chaining infix != == < <= > >= eq ne lt le gt ge ~~ === eqv !eqv X Tight and && X Tight or || ^^ // min max - L Conditional ?? !! ff fff + R Conditional ?? !! ff fff R Item assignment = := ::= => += -= **= xx= .= L Loose unary true not :by(2) X Comma operator , p5=> @@ -53,7 +53,8 @@ R List prefix : print push say die map substr ... [+] [*] any $ @ X Loose and and andthen X Loose or or xor orelse - N Terminator ; <==, ==>, <<==, ==>>, {...}, unless, extra ), ], } + L Sequencer <==, ==>, <<==, ==>> + N Terminator ; {...}, unless, extra ), ], } Using two C<!> symbols below generically to represent any pair of operators that have the same precedence, the associativities specified above Modified: src/perl6/STD.pm =================================================================== --- src/perl6/STD.pm 2009-01-16 06:07:31 UTC (rev 24925) +++ src/perl6/STD.pm 2009-01-16 07:42:00 UTC (rev 24926) @@ -97,7 +97,7 @@ bit bool Order Increasing Decreasing - Ordered Callable Positional Associatve + Ordered Callable Positional Associative Abstraction Ordering KeyExtractor Comparator OrderingPair IO @@ -124,8 +124,9 @@ # XXX likewise for routine defs my @baseroutinenames = qw[ - WHAT WHICH VAR + WHAT WHERE HOW WHICH VAR WHO WHENCE new any all none one + not true die exit warn caller want @@ -136,7 +137,7 @@ cat classify quotemeta chr ord - p5chop chop p5chomp chomp + p5chop chop p5chomp chomp trim index rindex substr join split comb pack unpack uc ucfirst lc lcfirst @@ -148,6 +149,7 @@ say print open close printf sprintf slurp unlink link symlink elems grep map first reduce sort uniq push reverse take splice + lines getc zip each roundrobin caller return leave pop shift unshift reduce @@ -224,14 +226,14 @@ constant %multiplicative = (:prec<u=>, :assoc<left>, :assign); constant %additive = (:prec<t=>, :assoc<left>, :assign); constant %replication = (:prec<s=>, :assoc<left>, :assign); -constant %concatenation = (:prec<r=>, :assoc<left>, :assign); +constant %concatenation = (:prec<r=>, :assoc<list>, :assign); constant %junctive_and = (:prec<q=>, :assoc<list>, :assign); constant %junctive_or = (:prec<p=>, :assoc<list>, :assign); constant %named_unary = (:prec<o=>); constant %nonchaining = (:prec<n=>, :assoc<non>); constant %chaining = (:prec<m=>, :assoc<chain>, :bool); -constant %tight_and = (:prec<l=>, :assoc<left>, :assign); -constant %tight_or = (:prec<k=>, :assoc<left>, :assign); +constant %tight_and = (:prec<l=>, :assoc<list>, :assign); +constant %tight_or = (:prec<k=>, :assoc<list>, :assign); constant %conditional = (:prec<j=>, :assoc<right>); constant %item_assignment = (:prec<i=>, :assoc<right>); constant %loose_unary = (:prec<h=>); @@ -239,8 +241,8 @@ constant %list_infix = (:prec<f=>, :assoc<list>, :assign); constant %list_assignment = (:prec<i=>, :sub<e=>, :assoc<right>); constant %list_prefix = (:prec<e=>); -constant %loose_and = (:prec<d=>, :assoc<left>, :assign); -constant %loose_or = (:prec<c=>, :assoc<left>, :assign); +constant %loose_and = (:prec<d=>, :assoc<list>, :assign); +constant %loose_or = (:prec<c=>, :assoc<list>, :assign); constant %sequencer = (:prec<b=>, :assoc<left>, :nextterm<statement>); constant %LOOSEST = (:prec<a=!>); constant %terminator = (:prec<a=>, :assoc<list>); Modified: t/operators/adverbial_modifiers.t =================================================================== --- t/operators/adverbial_modifiers.t 2009-01-16 06:07:31 UTC (rev 24925) +++ t/operators/adverbial_modifiers.t 2009-01-16 07:42:00 UTC (rev 24926) @@ -31,7 +31,7 @@ my $bar = 123; my @many = (4,5); sub dostuff(){"stuff"} - my($v,$e); + my ($v,$e); $e = (foo => $bar); $v = :foo($bar); is ~$v, ~$e, ':foo($bar)'; Modified: t/run/02-dash-n.t =================================================================== --- t/run/02-dash-n.t 2009-01-16 06:07:31 UTC (rev 24925) +++ t/run/02-dash-n.t 2009-01-16 07:42:00 UTC (rev 24926) @@ -37,7 +37,7 @@ "; sub nonce () { return (".{$*PID}." ~ (1..1000).pick) } -my($in_fn, $out_fn) = <temp-ex-input temp-ext-output> >>~<< nonce; +my ($in_fn, $out_fn) = <temp-ex-input temp-ext-output> >>~<< nonce; my $h = open("$in_fn", :w); $h.print($str); $h.close(); Modified: t/run/03-dash-p.t =================================================================== --- t/run/03-dash-p.t 2009-01-16 06:07:31 UTC (rev 24925) +++ t/run/03-dash-p.t 2009-01-16 07:42:00 UTC (rev 24926) @@ -41,7 +41,7 @@ "; sub nonce () { return (".{$*PID}." ~ (1..1000).pick) } -my($in_fn, $out_fn) = <temp-ex-input temp-ext-output> >>~<< nonce; +my ($in_fn, $out_fn) = <temp-ex-input temp-ext-output> >>~<< nonce; my $h = open("$in_fn", :w); $h.print($str); $h.close();