01: package antlr;
02:
03: /* ANTLR Translator Generator
04: * Project led by Terence Parr at http://www.cs.usfca.edu
05: * Software rights: http://www.antlr.org/license.html
06: */
07:
08: class TreeSpecifierNode {
09: private TreeSpecifierNode parent = null;
10: private TreeSpecifierNode firstChild = null;
11: private TreeSpecifierNode nextSibling = null;
12: private Token tok;
13:
14: TreeSpecifierNode(Token tok_) {
15: tok = tok_;
16: }
17:
18: public TreeSpecifierNode getFirstChild() {
19: return firstChild;
20: }
21:
22: public TreeSpecifierNode getNextSibling() {
23: return nextSibling;
24: }
25:
26: // Accessors
27: public TreeSpecifierNode getParent() {
28: return parent;
29: }
30:
31: public Token getToken() {
32: return tok;
33: }
34:
35: public void setFirstChild(TreeSpecifierNode child) {
36: firstChild = child;
37: child.parent = this ;
38: }
39:
40: // Structure-building
41: public void setNextSibling(TreeSpecifierNode sibling) {
42: nextSibling = sibling;
43: sibling.parent = parent;
44: }
45: }
|