public class SyntacticName extends java.lang.Object implements SyntacticTerm
Constructor and Description |
---|
SyntacticName()
Make named term with no reference or name.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(SyntacticTerm term)
Bind a given term to this named term.
|
java.lang.String |
generateCode()
Generate the lexical representation of the term.
|
java.lang.String |
generateDefinitionCode()
Generate definition code for name in terms of the expression
it is bound to.
|
SyntacticTerm |
getBound()
Get the term bound to this name.
|
java.util.List<SyntacticPort> |
getInputs()
Get a list of the input ports to the operator.
|
java.lang.String |
getName()
Get the name of the term.
|
int |
getOrder()
Get the sort order of the term.
|
java.util.List<SyntacticPort> |
getOutputs()
Get a list of output ports to the operator.
|
boolean |
hasCode()
Decide whether code can be generated from this term.
|
java.lang.Integer |
inputIndex(SyntacticPort port)
Get the index of an input port given a reference to it.
|
java.lang.Integer |
outputIndex(SyntacticPort port)
Get the index of an output port given a reference to it.
|
SyntacticRank |
rank()
Get the rank of the term.
|
void |
setName(java.lang.String name)
Set the name of the term.
|
int |
sizeInputs()
Get the number of inputs to the term.
|
int |
sizeOutputs()
Get the number of outputs from the term.
|
public java.util.List<SyntacticPort> getInputs()
getInputs
in interface SyntacticTerm
public java.util.List<SyntacticPort> getOutputs()
getOutputs
in interface SyntacticTerm
public int sizeInputs()
sizeInputs
in interface SyntacticTerm
public int sizeOutputs()
sizeOutputs
in interface SyntacticTerm
public SyntacticRank rank()
rank
in interface SyntacticTerm
public java.lang.Integer inputIndex(SyntacticPort port)
inputIndex
in interface SyntacticTerm
port
- Port to find the index of.public java.lang.Integer outputIndex(SyntacticPort port)
outputIndex
in interface SyntacticTerm
port
- Port to find the index of.public java.lang.String generateCode()
generateCode
in interface SyntacticTerm
public java.lang.String generateDefinitionCode()
public int getOrder()
getOrder
in interface SyntacticTerm
public boolean hasCode()
hasCode
in interface SyntacticTerm
public void setName(java.lang.String name)
name
- Name for the term.getName()
public void bind(SyntacticTerm term)
term
- Term to bind to name.public java.lang.String getName()
setName(java.lang.String)
public SyntacticTerm getBound()