gov.llnl.babel.parsers.sidl2

Class ParseTreeNode

Implemented Interfaces:
Node

public class ParseTreeNode
extends java.lang.Object
implements Node

Field Summary

protected Node[]
children
String
doc
protected Token
first
protected int
id
protected Token
last
String
name
protected Node
parent
protected SIDLParser
parser

Constructor Summary

ParseTreeNode(SIDLParser p, int i)
ParseTreeNode(int i)

Method Summary

Object
childrenAccept(SIDLParserVisitor visitor, Object data)
Accept the visitor.
void
dump(String prefix)
Token
getFirstToken()
int
getID()
Token
getLastToken()
Object
jjtAccept(SIDLParserVisitor visitor, Object data)
Accept the visitor.
void
jjtAddChild(Node n, int i)
This method tells the node to add its argument to the node's list of children.
void
jjtClose()
This method is called after all the child nodes have been added.
Node
jjtGetChild(int i)
This method returns a child node.
int
jjtGetNumChildren()
Return the number of children the node has.
Node
jjtGetParent()
void
jjtOpen()
This method is called after the node has been made the current node.
void
jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent.
String
toString()
String
toString(String prefix)

Field Details

children

protected Node[] children

doc

public String doc

first

protected Token first

id

protected int id

last

protected Token last

name

public String name

parent

protected Node parent

parser

protected SIDLParser parser

Constructor Details

ParseTreeNode

public ParseTreeNode(SIDLParser p,
                     int i)

ParseTreeNode

public ParseTreeNode(int i)

Method Details

childrenAccept

public Object childrenAccept(SIDLParserVisitor visitor,
                             Object data)
Accept the visitor. *

dump

public void dump(String prefix)

getFirstToken

public Token getFirstToken()

getID

public int getID()

getLastToken

public Token getLastToken()

jjtAccept

public Object jjtAccept(SIDLParserVisitor visitor,
                        Object data)
Accept the visitor. *
Specified by:
jjtAccept in interface Node

jjtAddChild

public void jjtAddChild(Node n,
                        int i)
This method tells the node to add its argument to the node's list of children.
Specified by:
jjtAddChild in interface Node

jjtClose

public void jjtClose()
This method is called after all the child nodes have been added.
Specified by:
jjtClose in interface Node

jjtGetChild

public Node jjtGetChild(int i)
This method returns a child node. The children are numbered from zero, left to right.
Specified by:
jjtGetChild in interface Node

jjtGetNumChildren

public int jjtGetNumChildren()
Return the number of children the node has.
Specified by:
jjtGetNumChildren in interface Node

jjtGetParent

public Node jjtGetParent()
Specified by:
jjtGetParent in interface Node

jjtOpen

public void jjtOpen()
This method is called after the node has been made the current node. It indicates that child nodes can now be added to it.
Specified by:
jjtOpen in interface Node

jjtSetParent

public void jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent.
Specified by:
jjtSetParent in interface Node

toString

public String toString()

toString

public String toString(String prefix)