version 1.15, 2006/03/13 19:23:46
|
version 1.16, 2006/03/13 20:28:53
|
Line 487 sub tostring {
|
Line 487 sub tostring {
|
$_ = $type; |
$_ = $type; |
/binop1/ && do { |
/binop1/ && do { |
my ($p1, $p2) = ('',''); |
my ($p1, $p2) = ('',''); |
if ($args[2]->[0] eq 'binop1') {($p1,$p2)=qw{ [ ] };} |
if ($args[2]->[0] eq 'binop1') {($p1,$p2)=qw{ ( ) };} |
return ($args[1]->tostring() . $args[0] . $p1 . |
return ($args[1]->tostring() . $args[0] . $p1 . |
$args[2]->tostring() . $p2); |
$args[2]->tostring() . $p2); |
}; |
}; |
/unop1/ && do { |
/unop1/ && do { |
my ($p1, $p2) = ('',''); |
my ($p1, $p2) = ('',''); |
if ($args[1]->[0] =~ /binop1/) {($p1,$p2)=qw{ [ ] };} |
if ($args[1]->[0] =~ /binop1/) {($p1,$p2)=qw{ ( ) };} |
return ($args[0] . $p1 . $args[1]->tostring() . $p2); |
return ($args[0] . $p1 . $args[1]->tostring() . $p2); |
}; |
}; |
/binop2/ && do { |
/binop2/ && do { |
my ($p1, $p2, $p3, $p4)=('','','',''); |
my ($p1, $p2, $p3, $p4)=('','','',''); |
if ($args[0] =~ /implicit/) {$args[0] = ' ';} |
if ($args[0] =~ /implicit/) {$args[0] = ' ';} |
if ($args[1]->[0] =~ /binop1/) {($p1,$p2)=qw{ [ ] };} |
if ($args[1]->[0] =~ /binop1/) {($p1,$p2)=qw{ ( ) };} |
# if ($args[2]->[0] =~ /binop[12]/) {($p3,$p4)=qw{ ( ) };} |
# if ($args[2]->[0] =~ /binop[12]/) {($p3,$p4)=qw{ ( ) };} |
if ($args[2]->[0] =~ /binop[12]|unop1/) {($p3,$p4)=qw{ ( ) };} |
if ($args[2]->[0] =~ /binop[12]|unop1/) {($p3,$p4)=qw{ ( ) };} |
return ($p1 . $args[1]->tostring() . $p2 . $args[0] . $p3 . |
return ($p1 . $args[1]->tostring() . $p2 . $args[0] . $p3 . |