public final class VerilogExpression
extends java.lang.Object
VerilogExpression
represents expressions.Constructor and Description |
---|
VerilogExpression()
Creates a null expression.
|
VerilogExpression(ru.ispras.fortress.expression.Node node)
Creates an expression with the given syntax.
|
VerilogExpression(VerilogExpression other)
Creates a copy of the expression.
|
Modifier and Type | Method and Description |
---|---|
VerilogExpression |
clone() |
java.util.List<VerilogAttribute> |
getAttributes()
Returns the expression attributes.
|
VerilogProcedure |
getDeclaration()
Returns the function declaration (for function calls only).
|
VerilogLiteral |
getLiteral()
Returns the literal.
|
ru.ispras.fortress.expression.Node |
getNode()
Returns the expression representation.
|
ru.ispras.fortress.expression.NodeOperation |
getOperation()
Returns the operation node (if the expression is an operation).
|
VerilogPath |
getPath()
Returns the path to the source-code function.
|
VerilogReference |
getReference()
Returns the reference (if the expression is primary).
|
ru.ispras.fortress.expression.NodeValue |
getValue()
Returns the value node (if the expression is a value).
|
ru.ispras.fortress.expression.NodeVariable |
getVariable()
Returns the variable node (if the expression is a variable).
|
boolean |
isNull()
Checks whether the expression is null.
|
boolean |
isOperation()
Checks whether the expression is an operation.
|
boolean |
isReference()
Checks whether the expression is a reference.
|
boolean |
isValue()
Checks whether the expression is a value.
|
boolean |
isVariable()
Checks whether the expression is a variable.
|
void |
setAttributes(java.util.List<VerilogAttribute> attributes)
Sets the expression attributes.
|
void |
setDeclaration(VerilogProcedure declaration)
Sets the function declaration (for function calls only).
|
void |
setNode(ru.ispras.fortress.expression.Node node)
Sets the original representation of the expression and resets the elaborated representation.
|
void |
setPath(VerilogPath path)
Sets a path to the source-code function.
|
void |
setReference(VerilogReference reference)
Sets the reference.
|
java.lang.String |
toString() |
public VerilogExpression()
public VerilogExpression(ru.ispras.fortress.expression.Node node)
node
- the expression syntax.public VerilogExpression(VerilogExpression other)
other
- the expression to be copied.public ru.ispras.fortress.expression.Node getNode()
public void setNode(ru.ispras.fortress.expression.Node node)
node
- the expression representation.public boolean isNull()
true
iff the expression is null.public boolean isValue()
true
iff the expression is a value.public boolean isVariable()
true
iff the expression is a variable.public boolean isOperation()
true
iff the expression is an operation.public ru.ispras.fortress.expression.NodeValue getValue()
public VerilogLiteral getLiteral()
public ru.ispras.fortress.expression.NodeVariable getVariable()
public ru.ispras.fortress.expression.NodeOperation getOperation()
public boolean isReference()
true
iff the expression is a reference.public VerilogReference getReference()
public void setReference(VerilogReference reference)
reference
- the reference to be set.public VerilogPath getPath()
public void setPath(VerilogPath path)
path
- the path to be set.public java.util.List<VerilogAttribute> getAttributes()
public void setAttributes(java.util.List<VerilogAttribute> attributes)
attributes
- the attributes to be set.public VerilogProcedure getDeclaration()
public void setDeclaration(VerilogProcedure declaration)
declaration
- the function declaration to be set.public java.lang.String toString()
toString
in class java.lang.Object
public VerilogExpression clone()
clone
in class java.lang.Object