develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r34969 - in branches/pct_hll/languages/APL: src/parser tools

From:
tene
Date:
January 5, 2009 00:29
Subject:
[svn:parrot] r34969 - in branches/pct_hll/languages/APL: src/parser tools
Message ID:
20090105082917.AFFCECB9F9@x12.develooper.com
Author: tene
Date: Mon Jan  5 00:29:16 2009
New Revision: 34969

Modified:
   branches/pct_hll/languages/APL/src/parser/actions.pm
   branches/pct_hll/languages/APL/tools/gen_operator_defs.pl

Log:
[APL]: Return results in addition to printing them.

Modified: branches/pct_hll/languages/APL/src/parser/actions.pm
==============================================================================
--- branches/pct_hll/languages/APL/src/parser/actions.pm	(original)
+++ branches/pct_hll/languages/APL/src/parser/actions.pm	Mon Jan  5 00:29:16 2009
@@ -18,7 +18,7 @@
 class APL::Grammar::Actions;
 
 method TOP($/) {
-    my $catchpir := "    get_results '0', $P0\n    $S0 = $P0\n    print $S0\n    exit 1\n";
+    my $catchpir := "    get_results '0', $P0\n    $S0 = $P0\n    print $S0\n    .return ($P0)\n";
     my $past := PAST::Block.new(
                     PAST::Op.new( $( $<statement_list> ),
                               PAST::Op.new( :inline( $catchpir) ),

Modified: branches/pct_hll/languages/APL/tools/gen_operator_defs.pl
==============================================================================
--- branches/pct_hll/languages/APL/tools/gen_operator_defs.pl	(original)
+++ branches/pct_hll/languages/APL/tools/gen_operator_defs.pl	Mon Jan  5 00:29:16 2009
@@ -280,6 +280,7 @@
 
     $S0 = aplformat(arg)
     say $S0
+    .return (arg)
 .end
 
 .sub 'aplvector'



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