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'