xtc.tree
Class ParseTreePrinter

java.lang.Object
  extended by xtc.tree.Visitor
      extended by xtc.tree.ParseTreePrinter

public class ParseTreePrinter
extends Visitor

Visitor to print parse trees.

Version:
$Revision: 1.3 $
Author:
Robert Grimm

Field Summary
protected  Printer printer
          The printer.
 
Constructor Summary
ParseTreePrinter(Printer printer)
          Create a new parse tree printer.
 
Method Summary
 void visit(Formatting f)
          Print the specified formatting node.
 void visit(GNode n)
          Print the specified generic node.
 void visit(Token t)
          Print the specified token.
 
Methods inherited from class xtc.tree.Visitor
dispatch, equals, hashCode, iterate, map, mapInPlace, unableToVisit, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

printer

protected final Printer printer
The printer.

Constructor Detail

ParseTreePrinter

public ParseTreePrinter(Printer printer)
Create a new parse tree printer.

Parameters:
printer - The printer.
Method Detail

visit

public void visit(GNode n)
Print the specified generic node.


visit

public void visit(Formatting f)
Print the specified formatting node.


visit

public void visit(Token t)
Print the specified token.



Copyright © 2012. All Rights Reserved.