SFE.Compiler
Class EqualOperator

java.lang.Object
  extended by SFE.Compiler.Operator
      extended by SFE.Compiler.EqualOperator
All Implemented Interfaces:
Multi2SingleBit

public class EqualOperator
extends Operator
implements Multi2SingleBit

A class for representing == operator expressions that can be defined in the program.


Constructor Summary
EqualOperator()
           
 
Method Summary
 int arity()
          Returns 2 as the arity of this PlusOperator.
 BlockStatement multi2SingleBit(java.lang.Object obj)
          Transforms this multibit expression into singlebit statements and adds them to the appropriate function.
 int priority()
          Returns 1 - The priority of this operator.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EqualOperator

public EqualOperator()
Method Detail

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

arity

public int arity()
Returns 2 as the arity of this PlusOperator. Arity is 1 for unary ops; 2 for binary ops; 3 for ternary ops; 0 for constants

Specified by:
arity in class Operator
Returns:
2 as the arity of this PlusOperator.

multi2SingleBit

public BlockStatement multi2SingleBit(java.lang.Object obj)
Transforms this multibit expression into singlebit statements and adds them to the appropriate function. Note: x<=y and x >=y <==> x==y.

Specified by:
multi2SingleBit in interface Multi2SingleBit
Parameters:
obj - the AssignmentStatement that holds this GreaterOperator.
Returns:
a BlockStatement containing the statements as single bits.

priority

public int priority()
Returns 1 - The priority of this operator.

Specified by:
priority in class Operator
Returns:
1 - The priority of this operator.