cgp.runtime
Class ScopeStack

java.lang.Object
  |
  +--cgp.runtime.ScopeStack

public class ScopeStack
extends java.lang.Object


Field Summary
private  java.util.LinkedList stack
           
 
Constructor Summary
ScopeStack()
           
 
Method Summary
 int depth()
           
 Type find(java.lang.String name)
          Search this stack of scopes in FILO order for the specified name.
 Scope getFrame(int i)
          Return the ith frame.
 Scope peek()
           
 Scope pop()
           
 Scope push(Scope s)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

stack

private java.util.LinkedList stack
Constructor Detail

ScopeStack

public ScopeStack()
Method Detail

depth

public int depth()

push

public Scope push(Scope s)

pop

public Scope pop()

peek

public Scope peek()

getFrame

public Scope getFrame(int i)
Return the ith frame. Precondition: i is >= 0 or < stack depth.

find

public Type find(java.lang.String name)
Search this stack of scopes in FILO order for the specified name.