org.parboiled.support
Class NodeFormatter<V>

java.lang.Object
  extended by org.parboiled.support.NodeFormatter<V>
All Implemented Interfaces:
Formatter<Node<V>>

public class NodeFormatter<V>
extends java.lang.Object
implements Formatter<Node<V>>

A simple Formatter that provides String representation for parse tree nodes.


Constructor Summary
NodeFormatter(InputBuffer inputBuffer)
          Creates a new NodeFormatter.
 
Method Summary
 java.lang.String format(Node<V> node)
          Create a string representation for the given obejct.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeFormatter

public NodeFormatter(InputBuffer inputBuffer)
Creates a new NodeFormatter.

Parameters:
inputBuffer - the input buffer underlying the parse tree whose nodes are to be formatted.
Method Detail

format

public java.lang.String format(Node<V> node)
Description copied from interface: Formatter
Create a string representation for the given obejct.

Specified by:
format in interface Formatter<Node<V>>
Parameters:
node - the object to format
Returns:
a string describing the object