|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkanga.visitor.DepthFirstVisitor
kanga.visitor.TreeDumper
public class TreeDumper
Dumps the syntax tree to a Writer using the location information in each NodeToken.
| Field Summary | |
|---|---|
protected java.io.PrintWriter |
out
|
| Constructor Summary | |
|---|---|
TreeDumper()
The default constructor uses System.out as its output location. |
|
TreeDumper(java.io.OutputStream o)
|
|
TreeDumper(java.io.Writer o)
|
|
| Method Summary | |
|---|---|
void |
flushWriter()
Flushes the OutputStream or Writer that this TreeDumper is using. |
void |
printSpecials(boolean b)
Allows you to specify whether or not to print special tokens. |
void |
resetPosition()
Resets the position of the output "cursor" to the first line and column. |
void |
startAtNextToken()
Starts the tree dumper on the line containing the next token visited. |
void |
visit(NodeToken n)
Dumps the current NodeToken to the output stream being used. |
| Methods inherited from class kanga.visitor.DepthFirstVisitor |
|---|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.PrintWriter out
| Constructor Detail |
|---|
public TreeDumper()
public TreeDumper(java.io.Writer o)
public TreeDumper(java.io.OutputStream o)
| Method Detail |
|---|
public void flushWriter()
public void printSpecials(boolean b)
public void startAtNextToken()
public void resetPosition()
public void visit(NodeToken n)
visit in interface Visitorvisit in class DepthFirstVisitorjava.lang.IllegalStateException - if the token position is invalid
relative to the current position, i.e. its location places it
before the previous token.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||