|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cppast.SimpleNode
public abstract class SimpleNode
Provides a custom base node implementation.
Constructor Summary | |
---|---|
SimpleNode(int id)
Create a node. |
|
SimpleNode(Parser parser,
int id)
Create a node. |
Method Summary | |
---|---|
java.lang.Object |
accept(ParserVisitor visitor,
java.lang.Object data)
Visit the children of the node. |
void |
closeScope(Token token)
Close the node scope. |
Token |
getFirstToken()
Retrieve the node first token. |
Token |
getLastToken()
Retrive the node last token. |
void |
jjtAddChild(Node node,
int index)
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 index)
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 node)
This pair of methods are used to inform the node of its parent. |
void |
openScope(Token token,
Scope scope)
Open the node scope. |
java.lang.String |
resolve(java.lang.String name)
Resolve a symbol to a fully scoped name. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface cppast.Node |
---|
jjtAccept |
Constructor Detail |
---|
public SimpleNode(int id)
id
- the node identifierpublic SimpleNode(Parser parser, int id)
parser
- the parserid
- the node identifierMethod Detail |
---|
public final void jjtOpen()
jjtOpen
in interface Node
public final void jjtClose()
jjtClose
in interface Node
public final void openScope(Token token, Scope scope)
token
- the first token of the nodescope
- the scope of the nodepublic final void closeScope(Token token)
token
- the last token of the nodepublic final java.lang.String resolve(java.lang.String name)
name
- the symbol
public final Token getFirstToken()
public final Token getLastToken()
public final void jjtSetParent(Node node)
jjtSetParent
in interface Node
public final Node jjtGetParent()
jjtGetParent
in interface Node
public final void jjtAddChild(Node node, int index)
jjtAddChild
in interface Node
public final Node jjtGetChild(int index)
jjtGetChild
in interface Node
public final int jjtGetNumChildren()
jjtGetNumChildren
in interface Node
public final java.lang.Object accept(ParserVisitor visitor, java.lang.Object data)
visitor
- the visitordata
- the custom data
public final java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |