|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.syntax.ASTNode
avrora.syntax.SyntacticOperand
The SyntacticOperand class is an implementation of the
avrora.core.Operand interface that corresponds to source
assembly programs. Therefore instances of this class contain Tokens
that tie them back to their original locations in the source assembly.
This is useful for reporting assembly errors when the prototype fails
to build an instruction because the operands do not meet the
constraints specified in the Atmel instruction set reference.
Operand,
InstrPrototype| Nested Class Summary | |
static class |
SyntacticOperand.Expr
The SyntacticOperand.Expr class represents a constant expression
that was specified in the source assembly as an expression. |
static class |
SyntacticOperand.Register
The SyntacticOperand.Register class represents a register
operand at the source level. |
| Nested classes inherited from class avrora.core.Operand |
Operand.Constant |
| Field Summary | |
protected AbstractToken |
left
|
protected AbstractToken |
right
|
| Method Summary | |
Operand.Constant |
asConstant()
The asConstant() method uses virtual dispatch to avoid a
cast. |
Operand.Register |
asRegister()
The asRegister() method uses virtual dispatch to avoid a
cast. |
AbstractToken |
getLeftMostToken()
The getLeftMostToken() method gets the first token associated
with the abstract syntax tree node. |
AbstractToken |
getRightMostToken()
The getRightMostToken() method gets the last token associated
with the abstract syntax tree node. |
abstract void |
simplify(int nextByteAddress,
Context c)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final AbstractToken left
protected final AbstractToken right
| Method Detail |
public abstract void simplify(int nextByteAddress,
Context c)
public AbstractToken getLeftMostToken()
ASTNodegetLeftMostToken() method gets the first token associated
with the abstract syntax tree node.
getLeftMostToken in class ASTNodeAbstractToken instance representing the first token
that is a part of this syntactic item.public AbstractToken getRightMostToken()
ASTNodegetRightMostToken() method gets the last token associated
with the abstract syntax tree node.
getRightMostToken in class ASTNodeAbstractToken instance representing the last token
that is a part of this syntactic item.public Operand.Register asRegister()
OperandasRegister() method uses virtual dispatch to avoid a
cast. If this operand is an instance of Operand.Register it
will return itself. Otherwise, it will return null.
asRegister in interface OperandOperand.Register; null
otherwisepublic Operand.Constant asConstant()
OperandasConstant() method uses virtual dispatch to avoid a
cast. If this operand is an instance of Operand.Constant it
will return itself. Otherwise, it will return null.
asConstant in interface OperandOperand.Constant; null
otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||