Groovy Documentation

java.gate.yam.parse
Class YamParseTree

java.lang.Object
  java.gate.yam.parse.YamParseTree

class YamParseTree

The parse tree and related state created by parsing a YAM file. Forms the input to YAM translators.

author:
Hamish Cunningham


Field Summary
SimpleNode contentsNode

The contents node of the tree.

List errors

A list of errors encountered during parsing.

List headingNodes

The heading nodes of the tree.

List includes

A list of includes of other local files made in the YAM source.

List links

A list of links to other local files made from the YAM source.

SimpleNode rootNode

The root node of the tree.

SimpleNode titleNode

The title node of the tree.

List warnings

A list of warnings encountered during parsing.

 
Constructor Summary
YamParseTree()

Construction.

 
Method Summary
void addHeadingNode(Node headingNode)

Add a heading node.

SimpleNode getContentsNode()

Get the contents node of the tree.

List getErrors()

Get the list of errors encountered during parsing.

List getHeadingNodes()

Get the list of heading nodes.

List getIncludes()

Get the list of includes of other local files made in the YAM source.

List getLinks()

Get the list of links to other local files made from the YAM source.

int getNumNodes(SimpleNode node)

Count the number of nodes in a (sub)tree.

int getNumNodes(int n, SimpleNode node)

Helper to count the number of nodes in a (sub)tree.

SimpleNode getRootNode()

Get the root node of the tree.

SimpleNode getTitleNode()

Get the title node of the tree.

List getWarnings()

Get the list of warnings encountered during parsing.

void merge(YamParseTree other)

Merge another tree with this one.

void reset()

Reset the output strings on all nodes in the tree.

void reset(SimpleNode n)

Recursive helper method for {

void setContentsNode(Node contentsNode)

Set the contents node of the tree.

void setRootNode(Node rootNode)

Set the root node of the tree.

void setTitleNode(Node titleNode)

Set the title node of the tree.

 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Field Detail

contentsNode

SimpleNode contentsNode
The contents node of the tree. Null if there is no contents node.


errors

List errors
A list of errors encountered during parsing.


headingNodes

List headingNodes
The heading nodes of the tree. Never null.


includes

List includes
A list of includes of other local files made in the YAM source.


links

List links
A list of links to other local files made from the YAM source.


rootNode

SimpleNode rootNode
The root node of the tree.


titleNode

SimpleNode titleNode
The title node of the tree. Null if there is no title node.


warnings

List warnings
A list of warnings encountered during parsing.


 
Constructor Detail

YamParseTree

public YamParseTree()
Construction.


 
Method Detail

addHeadingNode

public void addHeadingNode(Node headingNode)
Add a heading node.


getContentsNode

public SimpleNode getContentsNode()
Get the contents node of the tree.


getErrors

public List getErrors()
Get the list of errors encountered during parsing.


getHeadingNodes

public List getHeadingNodes()
Get the list of heading nodes.


getIncludes

public List getIncludes()
Get the list of includes of other local files made in the YAM source.


getLinks

public List getLinks()
Get the list of links to other local files made from the YAM source. These will always be relative links.


getNumNodes

public int getNumNodes(SimpleNode node)
Count the number of nodes in a (sub)tree.


getNumNodes

public int getNumNodes(int n, SimpleNode node)
Helper to count the number of nodes in a (sub)tree.


getRootNode

public SimpleNode getRootNode()
Get the root node of the tree.


getTitleNode

public SimpleNode getTitleNode()
Get the title node of the tree.


getWarnings

public List getWarnings()
Get the list of warnings encountered during parsing.


merge

public void merge(YamParseTree other)
Merge another tree with this one. It is assumed that the other tree is subsequent to this one.


reset

public void reset()
Reset the output strings on all nodes in the tree.


reset

public void reset(SimpleNode n)
Recursive helper method for reset().


setContentsNode

public void setContentsNode(Node contentsNode)
Set the contents node of the tree.


setRootNode

public void setRootNode(Node rootNode)
Set the root node of the tree.


setTitleNode

public void setTitleNode(Node titleNode)
Set the title node of the tree.


 

Groovy Documentation