Author: particle
Date: Wed Apr 26 07:19:06 2006
New Revision: 12435

Modified:
   trunk/languages/perl6/lib/grammar_optok.pge

Log:
[perl6] add operators
~ term: $() @() *() %()
~ symbolic unary: = -w -r -x -e -z -s -f -d
removed operators (they don't really belong here)
~ named unary sleep abs


Modified: trunk/languages/perl6/lib/grammar_optok.pge
==============================================================================
--- trunk/languages/perl6/lib/grammar_optok.pge (original)
+++ trunk/languages/perl6/lib/grammar_optok.pge Wed Apr 26 07:19:06 2006
@@ -8,6 +8,11 @@
     is parsed(&term)
     is pastrule('past_term') { ... }
 
+proto 'term:$()' is equiv('term:.') is nowz { ... }
+proto 'term:@()' is equiv('term:.') is nowz { ... }
+proto 'term:*()' is equiv('term:.') is nowz { ... }
+proto 'term:%()' is equiv('term:.') is nowz { ... }
+
 proto 'prelist:' is equiv('term:')
     is prec_close('05=')
     is nullterm
@@ -80,11 +85,15 @@
     is pir("    $I0 = istrue %0\n    %t = $I0")
     { ... }
 
-# waiting for term: rules
-# sub 'prefix:$' is equiv('prefix:!') { ... }
-# sub 'prefix:@' is equiv('prefix:!') { ... }
-# sub 'prefix:%' is equiv('prefix:!') { ... }
-# sub 'prefix:&' is equiv('prefix:!') { ... }
+proto 'prefix:-w' is equiv('prefix:!') is nows { ... }
+proto 'prefix:-r' is equiv('prefix:!') is nows { ... }
+proto 'prefix:-x' is equiv('prefix:!') is nows { ... }
+proto 'prefix:-e' is equiv('prefix:!') is nows { ... }
+proto 'prefix:-z' is equiv('prefix:!') is nows { ... }
+proto 'prefix:-s' is equiv('prefix:!') is nows { ... }
+proto 'prefix:-f' is equiv('prefix:!') is nows { ... }
+proto 'prefix:-d' is equiv('prefix:!') is nows { ... }
+proto 'prefix:=' is equiv('prefix:!') { ... }
 proto 'prefix:*' is equiv('prefix:!') { ... }
 proto 'prefix:**' is equiv('prefix:!') { ... }
 proto 'prefix:~^' is equiv('prefix:!') { ... }
@@ -192,15 +201,6 @@
     is nullterm
     { ... }
 
-proto 'prefix:sleep' is equiv('rand')
-    is nullterm
-    is pir("    $N0 = %0\n    sleep $N0")
-    { ... }
-
-proto 'prefix:abs' is equiv('rand')
-    is nullterm
-    is pir("    %r = abs %0")
-    { ... }
 
 
 ## nonchaining binary

Reply via email to