develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33716 - trunk/languages/perl6/build

From:
pmichaud
Date:
December 9, 2008 09:12
Subject:
[svn:parrot] r33716 - trunk/languages/perl6/build
Message ID:
20081209171218.88FF0CB9AF@x12.develooper.com
Author: pmichaud
Date: Tue Dec  9 09:12:17 2008
New Revision: 33716

Modified:
   trunk/languages/perl6/build/gen_metaop_pir.pl

Log:
[rakudo]:  Update gen_metaop_pir.pl to generate the unicode forms of sub/hyper.


Modified: trunk/languages/perl6/build/gen_metaop_pir.pl
==============================================================================
--- trunk/languages/perl6/build/gen_metaop_pir.pl	(original)
+++ trunk/languages/perl6/build/gen_metaop_pir.pl	Tue Dec  9 09:12:17 2008
@@ -58,8 +58,8 @@
 my $reducefmt =
     "    optable.'newtok'('prefix:[%s]', 'equiv'=>'infix:=')\n";
 my $hyper_no_dwim_fmt =
-    "    optable.'newtok'('infix:>>%s<<', 'equiv'=>'infix:%s')\n" .
-    "    optable.'newtok'(unicode:\"infix:\\u00ab%s\\u00bb\", 'equiv'=>'infix:%s', 'subname'=>'infix:>>%s<<')\n";
+    "    optable.'newtok'(%s, 'equiv'=>'infix:%s')\n" .
+    "    optable.'newtok'('infix:>>%s<<', 'equiv'=>'infix:%s', 'subname'=>%s)\n";
 
 my @gtokens = ();
 my @code = ();
@@ -90,9 +90,10 @@
         .end\n);
 
     # Non-dwimming hyper ops.
-    push @gtokens, sprintf( $hyper_no_dwim_fmt, ($opname) x 5 );
+    my $hypername = qq(unicode:"infix:\\u00ab$opname\\u00bb");
+    push @gtokens, sprintf($hyper_no_dwim_fmt, $hypername, $opname, $opname, $opname, $hypername);
     push @code, qq(
-        .sub 'infix:>>$opname<<'
+        .sub $hypername
             .param pmc a
             .param pmc b
             .tailcall '!HYPEROPNODWIM'('$opname', a, b)



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About