public abstract class BaseAST
extends java.lang.Object
implements persistence.antlr.collections.AST, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected BaseAST |
down |
protected BaseAST |
right |
| Constructor and Description |
|---|
BaseAST() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(persistence.antlr.collections.AST node)
Add a node to the end of the child list for this node
|
static java.lang.String |
decode(java.lang.String text) |
static java.lang.String |
encode(java.lang.String text) |
boolean |
equals(persistence.antlr.collections.AST t)
Is node t equal to this in terms of token type and text?
|
boolean |
equalsList(persistence.antlr.collections.AST t)
Is t an exact structural and equals() match of this tree.
|
boolean |
equalsListPartial(persistence.antlr.collections.AST sub)
Is 'sub' a subtree of this list?
The siblings of the root are NOT ignored.
|
boolean |
equalsTree(persistence.antlr.collections.AST t)
Is tree rooted at 'this' equal to 't'? The siblings
of 'this' are ignored.
|
boolean |
equalsTreePartial(persistence.antlr.collections.AST sub)
Is 't' a subtree of the tree rooted at 'this'? The siblings
of 'this' are ignored.
|
persistence.antlr.collections.ASTEnumeration |
findAll(persistence.antlr.collections.AST target)
Walk the tree looking for all exact subtree matches.
|
persistence.antlr.collections.ASTEnumeration |
findAllPartial(persistence.antlr.collections.AST sub)
Walk the tree looking for all subtrees.
|
int |
getColumn() |
persistence.antlr.collections.AST |
getFirstChild()
Get the first child of this node; null if not children
|
int |
getLine() |
persistence.antlr.collections.AST |
getNextSibling()
Get the next sibling in line after this one
|
int |
getNumberOfChildren()
How many children does this node have?
|
java.lang.String |
getText()
Get the token text for this node
|
static java.lang.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(persistence.antlr.collections.AST t) |
abstract void |
initialize(int t,
java.lang.String txt) |
abstract void |
initialize(Token t) |
void |
removeChildren()
Remove all children
|
void |
setFirstChild(persistence.antlr.collections.AST c)
Set the first child of a node.
|
void |
setNextSibling(persistence.antlr.collections.AST n)
Set the next sibling after this one.
|
void |
setText(java.lang.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,
java.lang.String[] names) |
java.lang.String |
toString() |
java.lang.String |
toStringList()
Print out a child-sibling tree in LISP notation
|
java.lang.String |
toStringTree() |
void |
xmlSerialize(java.io.Writer out) |
void |
xmlSerializeNode(java.io.Writer out) |
void |
xmlSerializeRootClose(java.io.Writer out) |
void |
xmlSerializeRootOpen(java.io.Writer out) |
public void addChild(persistence.antlr.collections.AST node)
addChild in interface persistence.antlr.collections.ASTpublic int getNumberOfChildren()
getNumberOfChildren in interface persistence.antlr.collections.ASTpublic boolean equals(persistence.antlr.collections.AST t)
equals in interface persistence.antlr.collections.ASTpublic boolean equalsList(persistence.antlr.collections.AST t)
equalsList in interface persistence.antlr.collections.ASTpublic boolean equalsListPartial(persistence.antlr.collections.AST sub)
equalsListPartial in interface persistence.antlr.collections.ASTpublic boolean equalsTree(persistence.antlr.collections.AST t)
equalsTree in interface persistence.antlr.collections.ASTpublic boolean equalsTreePartial(persistence.antlr.collections.AST sub)
equalsTreePartial in interface persistence.antlr.collections.ASTpublic persistence.antlr.collections.ASTEnumeration findAll(persistence.antlr.collections.AST target)
findAll in interface persistence.antlr.collections.ASTpublic persistence.antlr.collections.ASTEnumeration findAllPartial(persistence.antlr.collections.AST sub)
findAllPartial in interface persistence.antlr.collections.ASTpublic persistence.antlr.collections.AST getFirstChild()
getFirstChild in interface persistence.antlr.collections.ASTpublic persistence.antlr.collections.AST getNextSibling()
getNextSibling in interface persistence.antlr.collections.ASTpublic java.lang.String getText()
getText in interface persistence.antlr.collections.ASTpublic int getType()
getType in interface persistence.antlr.collections.ASTpublic int getLine()
getLine in interface persistence.antlr.collections.ASTpublic int getColumn()
getColumn in interface persistence.antlr.collections.ASTpublic abstract void initialize(int t,
java.lang.String txt)
initialize in interface persistence.antlr.collections.ASTpublic abstract void initialize(persistence.antlr.collections.AST t)
initialize in interface persistence.antlr.collections.ASTpublic abstract void initialize(Token t)
initialize in interface persistence.antlr.collections.ASTpublic void removeChildren()
public void setFirstChild(persistence.antlr.collections.AST c)
persistence.antlr.collections.ASTsetFirstChild in interface persistence.antlr.collections.ASTpublic void setNextSibling(persistence.antlr.collections.AST n)
persistence.antlr.collections.ASTsetNextSibling in interface persistence.antlr.collections.ASTpublic void setText(java.lang.String text)
setText in interface persistence.antlr.collections.ASTpublic void setType(int ttype)
setType in interface persistence.antlr.collections.ASTpublic static void setVerboseStringConversion(boolean verbose,
java.lang.String[] names)
public static java.lang.String[] getTokenNames()
public java.lang.String toString()
toString in interface persistence.antlr.collections.ASTtoString in class java.lang.Objectpublic java.lang.String toStringList()
toStringList in interface persistence.antlr.collections.ASTpublic java.lang.String toStringTree()
toStringTree in interface persistence.antlr.collections.ASTpublic static java.lang.String decode(java.lang.String text)
public static java.lang.String encode(java.lang.String text)
public void xmlSerializeNode(java.io.Writer out)
throws java.io.IOException
java.io.IOExceptionpublic void xmlSerializeRootOpen(java.io.Writer out)
throws java.io.IOException
java.io.IOExceptionpublic void xmlSerializeRootClose(java.io.Writer out)
throws java.io.IOException
java.io.IOExceptionpublic void xmlSerialize(java.io.Writer out)
throws java.io.IOException
java.io.IOException