avrora.syntax
Class SyntacticOperand.Register

java.lang.Object
  extended byavrora.syntax.ASTNode
      extended byavrora.syntax.SyntacticOperand
          extended byavrora.syntax.SyntacticOperand.Register
All Implemented Interfaces:
Operand, Operand.Register
Enclosing class:
SyntacticOperand

public static class SyntacticOperand.Register
extends SyntacticOperand
implements Operand.Register

The SyntacticOperand.Register class represents a register operand at the source level. This may be an actual register name (e.g. "r21") or it could be a symbolic name for a register that has been renamed by an assembler directive.


Nested Class Summary
 
Nested classes inherited from class avrora.syntax.SyntacticOperand
SyntacticOperand.Expr, SyntacticOperand.Register
 
Nested classes inherited from class avrora.core.Operand
Operand.Constant, Operand.Register
 
Field Summary
 AbstractToken name
           
 
Fields inherited from class avrora.syntax.SyntacticOperand
left, right
 
Constructor Summary
SyntacticOperand.Register(AbstractToken n)
           
 
Method Summary
 Operand.Register asRegister()
          The asRegister() method uses virtual dispatch to avoid a cast.
 Register getRegister()
          The getRegister() method returns a reference to the register represented by this operand.
 void simplify(int currentByteAddress, Context c)
           
 java.lang.String toString()
           
 
Methods inherited from class avrora.syntax.SyntacticOperand
asConstant, getLeftMostToken, getRightMostToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface avrora.core.Operand
asConstant
 

Field Detail

name

public final AbstractToken name
Constructor Detail

SyntacticOperand.Register

public SyntacticOperand.Register(AbstractToken n)
Method Detail

asRegister

public Operand.Register asRegister()
Description copied from interface: Operand
The asRegister() 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.

Specified by:
asRegister in interface Operand
Overrides:
asRegister in class SyntacticOperand

getRegister

public Register getRegister()
Description copied from interface: Operand.Register
The getRegister() method returns a reference to the register represented by this operand.

Specified by:
getRegister in interface Operand.Register
Returns:
a reference to the register that this operand refers to

simplify

public void simplify(int currentByteAddress,
                     Context c)
Specified by:
simplify in class SyntacticOperand

toString

public java.lang.String toString()