avrora.core.isdl
Class Architecture

java.lang.Object
  extended byavrora.core.isdl.Architecture

public class Architecture
extends java.lang.Object

The Architecture class represents a collection of instructions, encodings, operands, and subroutines that describe an instruction set architecture.


Nested Class Summary
static interface Architecture.EncodingVisitor
          The EncodingVisitor interface is a simple interface that can be used to iterate over the encodings declared in the instruction set specification.
static interface Architecture.InstrVisitor
          The InstrVisitor interface is a simple interface that can be used to iterate over the instructions declared in the instruction set specification.
static interface Architecture.OperandVisitor
          The OperandVisitor interface is a simple interface that can be used to iterate over the operands declared in the instruction set specification.
 class Architecture.PrettyPrinter
           
static interface Architecture.SubroutineVisitor
          The SubroutineVisitor interface is a simple interface that can be used to iterate over the subroutines declared in the instruction set specification.
static interface Architecture.Visitor
          The Visitor class represents a visitor over the elements of the architecture description.
 
Field Summary
static boolean INLINE
           
 Token name
           
 
Constructor Summary
Architecture(Token n)
          The constructor for the Architecture class creates an instance with the specified name that is empty and ready to receive new instruction declarations, encodings, etc.
 
Method Summary
 void accept(Architecture.EncodingVisitor v)
           
 void accept(Architecture.InstrVisitor v)
           
 void accept(Architecture.OperandVisitor v)
           
 void accept(Architecture.SubroutineVisitor v)
           
 void accept(Architecture.Visitor v)
          The accept() method implements part of the visitor pattern that allows a visitor to visit each part of the architecture description.
 void addEncoding(EncodingDecl d)
           
 void addInstruction(InstrDecl i)
           
 void addOperand(OperandDecl d)
           
 void addSubroutine(SubroutineDecl d)
           
 java.util.Iterator getEncodingIterator()
           
 java.util.Iterator getInstrIterator()
           
 InstrDecl getInstruction(java.lang.String name)
           
 OperandDecl getOperandDecl(java.lang.String name)
           
 SubroutineDecl getSubroutine(java.lang.String name)
           
 java.util.Iterator getSubroutineIterator()
           
 void process()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INLINE

public static boolean INLINE

name

public final Token name
Constructor Detail

Architecture

public Architecture(Token n)
The constructor for the Architecture class creates an instance with the specified name that is empty and ready to receive new instruction declarations, encodings, etc.

Parameters:
n -
Method Detail

process

public void process()

getInstrIterator

public java.util.Iterator getInstrIterator()

getEncodingIterator

public java.util.Iterator getEncodingIterator()

getSubroutineIterator

public java.util.Iterator getSubroutineIterator()

addSubroutine

public void addSubroutine(SubroutineDecl d)

addInstruction

public void addInstruction(InstrDecl i)

addOperand

public void addOperand(OperandDecl d)

addEncoding

public void addEncoding(EncodingDecl d)

accept

public void accept(Architecture.Visitor v)
The accept() method implements part of the visitor pattern that allows a visitor to visit each part of the architecture description.

Parameters:
v - the visitor to accept

accept

public void accept(Architecture.OperandVisitor v)

accept

public void accept(Architecture.EncodingVisitor v)

accept

public void accept(Architecture.SubroutineVisitor v)

accept

public void accept(Architecture.InstrVisitor v)

getInstruction

public InstrDecl getInstruction(java.lang.String name)

getSubroutine

public SubroutineDecl getSubroutine(java.lang.String name)

getOperandDecl

public OperandDecl getOperandDecl(java.lang.String name)