| 1 |
/* All AST nodes must implement this interface. It provides basic |
| 2 |
machinery for constructing the parent and child relationships |
| 3 |
between nodes. */ |
| 4 |
|
| 5 |
#if SUPPORT_CLASS_VISIBILITY_PUBLIC |
| 6 |
public |
| 7 |
#fi |
| 8 |
interface Node { |
| 9 |
|
| 10 |
/** This method is called after the node has been made the current |
| 11 |
node. It indicates that child nodes can now be added to it. */ |
| 12 |
public void jjtOpen(); |
| 13 |
|
| 14 |
/** This method is called after all the child nodes have been |
| 15 |
added. */ |
| 16 |
public void jjtClose(); |
| 17 |
|
| 18 |
/** This pair of methods are used to inform the node of its |
| 19 |
parent. */ |
| 20 |
public void jjtSetParent(Node n); |
| 21 |
public Node jjtGetParent(); |
| 22 |
|
| 23 |
/** This method tells the node to add its argument to the node's |
| 24 |
list of children. */ |
| 25 |
public void jjtAddChild(Node n, int i); |
| 26 |
|
| 27 |
/** This method returns a child node. The children are numbered |
| 28 |
from zero, left to right. */ |
| 29 |
public Node jjtGetChild(int i); |
| 30 |
|
| 31 |
/** Return the number of children the node has. */ |
| 32 |
public int jjtGetNumChildren(); |
| 33 |
#if VISITOR |
| 34 |
|
| 35 |
/** Accept the visitor. **/ |
| 36 |
#if VISITOR_EXCEPTION |
| 37 |
public ${VISITOR_RETURN_TYPE} jjtAccept(${PARSER_NAME}Visitor visitor, ${VISITOR_DATA_TYPE:-Object} data) throws ${VISITOR_EXCEPTION}; |
| 38 |
#else |
| 39 |
public ${VISITOR_RETURN_TYPE} jjtAccept(${PARSER_NAME}Visitor visitor, ${VISITOR_DATA_TYPE:-Object} data); |
| 40 |
#fi |
| 41 |
#fi |
| 42 |
} |