帆软使用的第三方框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

48 lines
1.1 KiB

package com.fr.third.antlr;
/* ANTLR Translator Generator
* Project led by Terence Parr at http://www.cs.usfca.edu
* Software rights: http://www.antlr.org/license.html
*
* $Id: //depot/code/org.antlr/release/antlr-2.7.7/antlr/TreeSpecifierNode.java#2 $
*/
class TreeSpecifierNode {
private TreeSpecifierNode parent = null;
private TreeSpecifierNode firstChild = null;
private TreeSpecifierNode nextSibling = null;
private Token tok;
TreeSpecifierNode(Token tok_) {
tok = tok_;
}
public TreeSpecifierNode getFirstChild() {
return firstChild;
}
public TreeSpecifierNode getNextSibling() {
return nextSibling;
}
// Accessors
public TreeSpecifierNode getParent() {
return parent;
}
public Token getToken() {
return tok;
}
public void setFirstChild(TreeSpecifierNode child) {
firstChild = child;
child.parent = this;
}
// Structure-building
public void setNextSibling(TreeSpecifierNode sibling) {
nextSibling = sibling;
sibling.parent = parent;
}
}