edu.cornell.cs.sam.core
Interface ReferenceTable

All Known Implementing Classes:
SamReferenceTable

public interface ReferenceTable

The Reference Table stores information about unresolved symbols - it keeps track of references to each symbol.


Method Summary
 void add(java.lang.String symbol, int ref_address)
          Adds a new reference to a symbol
 void deleteSymbol(java.lang.String symbol)
          Deletes a symbol and all references to it
 java.util.Collection<java.lang.Integer> getReferences(java.lang.String symbol)
          Returns the addresses to all references to a particular symbol.
 int size()
          Returns the size of the reference table
 java.lang.String toString()
          Returns a string version of the table
 

Method Detail

add

void add(java.lang.String symbol,
         int ref_address)
Adds a new reference to a symbol


deleteSymbol

void deleteSymbol(java.lang.String symbol)
Deletes a symbol and all references to it


getReferences

java.util.Collection<java.lang.Integer> getReferences(java.lang.String symbol)
Returns the addresses to all references to a particular symbol.


toString

java.lang.String toString()
Returns a string version of the table

Overrides:
toString in class java.lang.Object

size

int size()
Returns the size of the reference table