Groovy Documentation

java.gate.yam.translate
Class TreeTranslator

java.lang.Object
  java.gate.yam.translate.AbstractTranslator
      java.gate.yam.translate.TreeTranslator

class TreeTranslator
extends AbstractTranslator

This class prints the parse tree for a YAM document. It is intended for testing and debugging.

author:
Hamish Cunningham


Constructor Summary
TreeTranslator()

Construction.

 
Method Summary
String[][] getConstantsTable()

Array mapping node type name to start/end strings.

String getPreamblePath()

Get the path to the preamble resource.

Object[][] getPredicatesTable()

Array mapping predicate type name to attributes.

void processURLs(SimpleNode node)

Process URLs and Anchors.

Writer translate()

Translation.

void traverse(String prefix, SimpleNode node)

Traverse a subtree.

 
Methods inherited from class AbstractTranslator
addToFooter, elide, getConstantArray, getConstantEnd, getConstantEnd, getConstantStart, getConstantStart, getHeadingNumber, getIndent, getNodeImage, getNodeImage, makeContents, makeHeader, makePreamble, makePreamble, pr, printEndNotes, printTree, printTree, printTree, prln, processControl, processPredicate, processURLs, setIOHandler, setParseTree, setWriter, subNewlines, translate
 

Constructor Detail

TreeTranslator

public TreeTranslator()
Construction.


 
Method Detail

getConstantsTable

public String[][] getConstantsTable()
Array mapping node type name to start/end strings. Unused for trees.


getPreamblePath

public String getPreamblePath()
Get the path to the preamble resource.


getPredicatesTable

public Object[][] getPredicatesTable()
Array mapping predicate type name to attributes. Unused for trees.


processURLs

public void processURLs(SimpleNode node)
Process URLs and Anchors.


translate

public Writer translate()
Translation. Results are written to the Writer.


traverse

public void traverse(String prefix, SimpleNode node)
Traverse a subtree.


 

Groovy Documentation