com.singularsys.jep.walkers
Class PrefixTreeDumper

java.lang.Object
  extended by com.singularsys.jep.walkers.PrefixTreeWalker
      extended by com.singularsys.jep.walkers.PrefixTreeDumper

public class PrefixTreeDumper
extends PrefixTreeWalker

Dumps the contents of a tree to a specified stream, or to standard output. Use this class by calling the walk method.

Author:
Richard Morris

Constructor Summary
PrefixTreeDumper()
           
PrefixTreeDumper(java.io.PrintStream stream)
           
 
Method Summary
 void dump(Node node)
           
protected  void output(Node n, int depth)
           
protected  void visit(ASTConstant node, int nchildren, int depth)
           
protected  void visit(ASTFunNode node, int nchildren, int depth)
           
protected  void visit(ASTOpNode node, int nchildren, int depth)
           
protected  void visit(ASTVarNode node, int nchildren, int depth)
           
 
Methods inherited from class com.singularsys.jep.walkers.PrefixTreeWalker
walk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrefixTreeDumper

public PrefixTreeDumper()

PrefixTreeDumper

public PrefixTreeDumper(java.io.PrintStream stream)
Method Detail

dump

public void dump(Node node)
          throws JepException
Throws:
JepException

visit

protected void visit(ASTConstant node,
                     int nchildren,
                     int depth)
Specified by:
visit in class PrefixTreeWalker

visit

protected void visit(ASTFunNode node,
                     int nchildren,
                     int depth)
Specified by:
visit in class PrefixTreeWalker

visit

protected void visit(ASTOpNode node,
                     int nchildren,
                     int depth)
Specified by:
visit in class PrefixTreeWalker

visit

protected void visit(ASTVarNode node,
                     int nchildren,
                     int depth)
Specified by:
visit in class PrefixTreeWalker

output

protected void output(Node n,
                      int depth)


Copyright © 2010 Singular Systems http://www.singularsys.com/jep