coins.sym
Class SymNestIteratorImpl

java.lang.Object
  extended bycoins.sym.SymNestIteratorImpl
All Implemented Interfaces:
SymNestIterator

public class SymNestIteratorImpl
extends java.lang.Object
implements SymNestIterator

SymNestIteratorImpl class


Field Summary
protected  int fStackDepth
           
protected  Sym fSymNext
           
protected  java.util.ArrayList fSymTableStack
           
 
Constructor Summary
SymNestIteratorImpl(SymTable pSymTable)
           
 
Method Summary
 boolean hasNext()
          hasNext True if there are symbols remaining in the specified symbol table or its children, false otherwise.
 Sym next()
          next Get next symbol in the specified symbol table and its children.
 Var nextVar()
          nextVar Get the next symbol in the specified symbol table and its children skipping symbols that are not a Var symbol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fStackDepth

protected int fStackDepth

fSymTableStack

protected java.util.ArrayList fSymTableStack

fSymNext

protected Sym fSymNext
Constructor Detail

SymNestIteratorImpl

public SymNestIteratorImpl(SymTable pSymTable)
Method Detail

next

public Sym next()
Description copied from interface: SymNestIterator
next Get next symbol in the specified symbol table and its children. If all symbols are traversed in the specified symbol table, then symbols in the first child symbol table and then its brothers are traversed, that is, traversing in the order: this, 1st child of this, 1st child of 1st child of this, ... 2nd child of 1st child of this, ... ... 2nd child of this, 1st child of 2nd child of this, ... ... ... recursively.

Specified by:
next in interface SymNestIterator

nextVar

public Var nextVar()
Description copied from interface: SymNestIterator
nextVar Get the next symbol in the specified symbol table and its children skipping symbols that are not a Var symbol. If the last symbol is not a variable, then null will be returned as the last symbol.

Specified by:
nextVar in interface SymNestIterator

hasNext

public boolean hasNext()
Description copied from interface: SymNestIterator
hasNext True if there are symbols remaining in the specified symbol table or its children, false otherwise.

Specified by:
hasNext in interface SymNestIterator