[system] / trunk / pg / lib / Parser / BOP / equality.pm Repository:
ViewVC logotype

Diff of /trunk/pg/lib/Parser/BOP/equality.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 5000 Revision 5001
34sub _reduce { 34sub _reduce {
35 my $self = shift; 35 my $self = shift;
36 my $equation = $self->{equation}; 36 my $equation = $self->{equation};
37 my $reduce = $equation->{context}{reduction}; 37 my $reduce = $equation->{context}{reduction};
38 if ($self->{lop}->isNeg && $self->{rop}->isNeg && $reduce->{'-x=-y'}) { 38 if ($self->{lop}->isNeg && $self->{rop}->isNeg && $reduce->{'-x=-y'}) {
39 $self = $equation->{context}{parser}{BOP}->new($equation,'=',$self->{lop}{op},$self->{rop}{op}); 39 $self = $self->Item("BOP")->new($equation,'=',$self->{lop}{op},$self->{rop}{op});
40 $self = $self->reduce; 40 $self = $self->reduce;
41 } 41 }
42 if ($self->{lop}->isNeg && $self->{rop}{isConstant} && 42 if ($self->{lop}->isNeg && $self->{rop}{isConstant} &&
43 $self->{rop}->isNumber && $reduce->{'-x=n'}) { 43 $self->{rop}->isNumber && $reduce->{'-x=n'}) {
44 $self = $equation->{context}{parser}{BOP}->new
45 ($equation,"=",$self->{lop}{op},Parser::UOP::Neg($self->{rop})); 44 $self = $self->Item("BOP")->new($equation,"=",$self->{lop}{op},Parser::UOP::Neg($self->{rop}));
46 $self = $self->reduce; 45 $self = $self->reduce;
47 } 46 }
48 return $self; 47 return $self;
49} 48}
50 49

Legend:
Removed from v.5000  
changed lines
  Added in v.5001

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9