Methods Summary |
---|
public boolean | hasNext()
return next != null;
|
public java.lang.Object | next()
return nextNode();
|
public antlr.collections.AST | nextNode()
current = next;
if ( next != null ) {
AST child = next.getFirstChild();
if ( child == null ) {
AST sibling = next.getNextSibling();
if ( sibling == null ) {
AST parent = pop();
while ( parent != null && parent.getNextSibling() == null )
parent = pop();
next = ( parent != null ) ? parent.getNextSibling() : null;
}
else {
next = sibling;
}
}
else {
if ( next != tree ) {
push( next );
}
next = child;
}
}
return current;
|
private antlr.collections.AST | pop()
if ( parents.size() == 0 ) {
return null;
}
else {
return ( AST ) parents.removeFirst();
}
|
private void | push(antlr.collections.AST parent)
parents.addFirst( parent );
|
public void | remove()
throw new UnsupportedOperationException( "remove() is not supported" );
|