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