|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSFE.Compiler.Expression
SFE.Compiler.LvalExpression
public class LvalExpression
The LvalExpression class represents an Expression that can appear as LHS in the program.
Field Summary | |
---|---|
static java.util.Vector |
inputFormat
|
Constructor Summary | |
---|---|
LvalExpression(Lvalue lvalue)
LvalExpression constractor |
Method Summary | |
---|---|
Expression |
bitAt(int i)
Returns Expression that represents the bit at place i of this Expression |
Statement |
getAssigningStatement()
Returns the assigning statement of this lvalexpression. |
Lvalue |
getLvalue()
Returns this Lavlue. |
Expression |
getMiddleOfUnaryInput()
Returns the input of the unary gate that this expression is its result. |
java.lang.String |
getName()
Returns the name of this LvalExpression's lvalue. |
Type |
getType()
Returns the Type of this LvalExpression's lvalue. |
boolean |
hasSharedInput(Expression exp)
Returns true if this expression has input pins that share an input. |
boolean |
hasUnaryInput()
Returns true if this LvalExpression is a result of an unary operator. |
boolean |
isOutput()
Returns true if the this expression is a part out the circuit's output. |
LvalExpression |
lvalBitAt(int i)
Returns LvalExpression that represents the bit at place i of this Expression |
void |
notOutput()
sets this LvalExpression as a pin that is not an output of this circuit. |
void |
setAssigningStatement(Statement as)
Set the reference to this expressionn assigning statement, Which can be either AssignmentStatement or InputStatement. |
int |
size()
Returns the number of bits needed to represent this expression. |
void |
toCircuit(java.io.PrintWriter circuit)
Prints this AssignmentStatement into the circuit. |
java.lang.String |
toString()
Returns a string representation of the object. |
boolean |
unaryInputIsNotResult()
Returns true if this expression is a result of unary not expression. |
Methods inherited from class SFE.Compiler.Expression |
---|
duplicate, evaluateExpression |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Vector inputFormat
Constructor Detail |
---|
public LvalExpression(Lvalue lvalue)
lvalue
- Method Detail |
---|
public int size()
size
in class Expression
public java.lang.String toString()
toString
in class java.lang.Object
public Lvalue getLvalue()
public Expression bitAt(int i)
bitAt
in class Expression
public LvalExpression lvalBitAt(int i)
public java.lang.String getName()
public Type getType()
public boolean isOutput()
public void setAssigningStatement(Statement as)
as
- the assigning statement.public Statement getAssigningStatement()
public void toCircuit(java.io.PrintWriter circuit)
circuit
- the circuit output file.public void notOutput()
public boolean hasUnaryInput()
public boolean unaryInputIsNotResult()
public Expression getMiddleOfUnaryInput()
public boolean hasSharedInput(Expression exp)
hasSharedInput
in class Expression
exp
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |