Raptor.ProgramParser.Statements.PAExp
Class PAExp

java.lang.Object
  extended by Raptor.ProgramParser.Statements.PTerm
      extended by Raptor.ProgramParser.Statements.PAExp.PAExp
All Implemented Interfaces:
java.io.Serializable

public class PAExp
extends PTerm

Abstract class for arithmetic expressions.

See Also:
Serialized Form

Field Summary
 PTerm left
           
 java.lang.String op
           
 PTerm right
           
 
Constructor Summary
PAExp(PTerm pLeft, PTerm pRight, java.lang.String pOp)
          Create a new arithmetic expression
 
Method Summary
 java.lang.String clashes(PanSignature pSignature)
          Returns a String of error message if this Term clashes with the passed PanSignature.
A Term clashes with a PanSignature if it clashes with any of its Predicates,Constants,Functions or Variables.
If this Term does not clash with the Signature, it is added to the signature and an empty String is returned.
 java.lang.String display()
          Returns a String to display the PAExp.
 PTerm getLeft()
          Returns the left hand side of the arithmetic expression.
 PTerm getRight()
          Returns the right hand side of the arithmetic expression.
 Term s()
          Creates VVar to replace PVar in the term where necessary.
 
Methods inherited from class Raptor.ProgramParser.Statements.PTerm
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

left

public PTerm left

right

public PTerm right

op

public java.lang.String op
Constructor Detail

PAExp

public PAExp(PTerm pLeft,
             PTerm pRight,
             java.lang.String pOp)
Create a new arithmetic expression

Parameters:
pLeft - the left operand of the arithmetic expression
pRight - the right operand of the arithmetic expression
pOp - the operator of the arithmetic expression
Method Detail

display

public java.lang.String display()
Returns a String to display the PAExp.

Specified by:
display in class PTerm

getLeft

public PTerm getLeft()
Returns the left hand side of the arithmetic expression.


getRight

public PTerm getRight()
Returns the right hand side of the arithmetic expression.


clashes

public java.lang.String clashes(PanSignature pSignature)
Returns a String of error message if this Term clashes with the passed PanSignature.
A Term clashes with a PanSignature if it clashes with any of its Predicates,Constants,Functions or Variables.
If this Term does not clash with the Signature, it is added to the signature and an empty String is returned.

Specified by:
clashes in class PTerm
Parameters:
pSignature - PanSignature Represents the signature to be compared against.

s

public Term s()
Creates VVar to replace PVar in the term where necessary.

Specified by:
s in class PTerm