Package com.singularsys.jep.walkers
Class PrefixTreeDumper
- java.lang.Object
-
- com.singularsys.jep.walkers.PrefixTreeWalker
-
- 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
Constructors Constructor Description PrefixTreeDumper()
PrefixTreeDumper(java.io.PrintStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dump(Node node)
protected void
output(Node n, int depth1)
protected void
visit(ASTConstant node, int nchildren, int depth1)
protected void
visit(ASTFunNode node, int nchildren, int depth1)
protected void
visit(ASTOpNode node, int nchildren, int depth1)
protected void
visit(ASTVarNode node, int nchildren, int depth1)
-
Methods inherited from class com.singularsys.jep.walkers.PrefixTreeWalker
walk
-
-
-
-
Method Detail
-
dump
public void dump(Node node) throws JepException
- Throws:
JepException
-
visit
protected void visit(ASTConstant node, int nchildren, int depth1)
- Specified by:
visit
in classPrefixTreeWalker
-
visit
protected void visit(ASTFunNode node, int nchildren, int depth1)
- Specified by:
visit
in classPrefixTreeWalker
-
visit
protected void visit(ASTOpNode node, int nchildren, int depth1)
- Specified by:
visit
in classPrefixTreeWalker
-
visit
protected void visit(ASTVarNode node, int nchildren, int depth1)
- Specified by:
visit
in classPrefixTreeWalker
-
output
protected void output(Node n, int depth1)
-
-