cvsuser 04/07/28 23:56:59
Modified: languages/python pie-thon.pl
Log:
minor fixes
Revision Changes Path
1.66 +22 -3 parrot/languages/python/pie-thon.pl
Index: pie-thon.pl
===================================================================
RCS file: /cvs/public/parrot/languages/python/pie-thon.pl,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -w -r1.65 -r1.66
--- pie-thon.pl 23 Jul 2004 16:25:44 -0000 1.65
+++ pie-thon.pl 29 Jul 2004 06:56:59 -0000 1.66
@@ -169,7 +169,7 @@
$l =~ s/>>//;
}
my $source = undef;
- if ($l =~ /^\s+ # intial space
+ if ($l =~ /^\s* # intial space
(?:(\d+)\s+)? # optional line
(\d+)\s+ # PC
([\w+]+)\s+ # opcode e.g. SLICE+3
@@ -457,6 +457,9 @@
elsif (is_num($c)) { # num
$t = 'N';
}
+ elsif ($c =~ /^\(/) {
+ $t = 'u'; # unimp
+ }
$t;
}
@@ -552,7 +555,7 @@
if ($make_f) {
$make_f = 0;
print_stack();
- print "# make_f t$cmt\n";
+ print "# make_f \t$cmt\n";
return;
}
my $tos = pop @stack;
@@ -731,7 +734,7 @@
my $f;
$tos->[1] =~ /<code> (\S+)/;
$f = $1;
- print "\t\t$cmt\n";
+ print "\t\t$cmt $f\n";
if ($n) {
for (my $i=0; $i < $n; ++$i) {
my $arg = pop @stack;
@@ -1858,4 +1861,20 @@
EOC
}
+sub IMPORT_NAME {
+ my ($n, $c, $cmt) = @_;
+ pop @stack;
+ print <<EOC;
+ \t $cmt XXX
+EOC
+}
+sub IMPORT_FROM {
+ my ($n, $c, $cmt) = @_;
+ print <<EOC;
+ \t $cmt XXX
+EOC
+ # push @stack, [-1, 'time', 'P'];
+ $code_l++;
+}
+
# vim: sw=4 tw=70: