antlr
public abstract class BaseAST extends Object implements AST, Serializable
Field Summary | |
---|---|
protected BaseAST | down |
protected BaseAST | right |
Method Summary | |
---|---|
void | addChild(AST node) Add a node to the end of the child list for this node |
static String | decode(String text) |
static String | encode(String text) |
boolean | equals(AST t) Is node t equal to this in terms of token type and text? |
boolean | equalsList(AST t) Is t an exact structural and equals() match of this tree. |
boolean | equalsListPartial(AST sub) Is 'sub' a subtree of this list?
|
boolean | equalsTree(AST t) Is tree rooted at 'this' equal to 't'? |
boolean | equalsTreePartial(AST sub) Is 't' a subtree of the tree rooted at 'this'? |
ASTEnumeration | findAll(AST target) Walk the tree looking for all exact subtree matches. |
ASTEnumeration | findAllPartial(AST sub) Walk the tree looking for all subtrees. |
int | getColumn() |
AST | getFirstChild() Get the first child of this node; null if not children |
int | getLine() |
AST | getNextSibling() Get the next sibling in line after this one |
int | getNumberOfChildren() How many children does this node have? |
String | getText() Get the token text for this node |
static String[] | getTokenNames() Return an array of strings that maps token ID to it's text. |
int | getType() Get the token type for this node |
abstract void | initialize(int t, String txt) |
abstract void | initialize(AST t) |
abstract void | initialize(Token t) |
void | removeChildren() Remove all children |
void | setFirstChild(AST c) |
void | setNextSibling(AST n) |
void | setText(String text) Set the token text for this node |
void | setType(int ttype) Set the token type for this node |
static void | setVerboseStringConversion(boolean verbose, String[] names) |
String | toString() |
String | toStringList() Print out a child-sibling tree in LISP notation |
String | toStringTree() |
void | xmlSerialize(Writer out) |
void | xmlSerializeNode(Writer out) |
void | xmlSerializeRootClose(Writer out) |
void | xmlSerializeRootOpen(Writer out) |