|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectantlr.BaseAST
antlr.CommonAST
biz.hammurapi.antlr.AST
public class AST
Holds line and column numbers
| Field Summary |
|---|
| Fields inherited from class antlr.BaseAST |
|---|
down, right |
| Constructor Summary | |
|---|---|
AST()
|
|
| Method Summary | |
|---|---|
boolean |
accept(Visitor visitor)
|
void |
addChild(antlr.collections.AST node)
Parent calculation |
void |
enumerate()
|
boolean |
equals(java.lang.Object obj)
|
AST |
find(int type)
Finds AST of given type in this AST and siblings. |
AST |
findChild(int type)
Finds child of given type. |
java.lang.Object |
getAttribute(java.lang.Object key)
|
int |
getColumn()
|
Token |
getFirstToken()
|
java.lang.String |
getId()
|
Token |
getLastToken()
|
int |
getLeftColumn()
Returns leftmost non-zero column among itself and all children |
int |
getLine()
|
AST |
getParent()
|
AST |
getPrevSibling()
|
int |
getSize()
|
java.lang.Integer |
getSourceId()
Crude hack, but can't come up with anything better at the time. |
java.lang.String |
getSourceURL()
|
Token |
getToken()
|
int |
hashCode()
|
void |
initialize(antlr.collections.AST node)
|
void |
initialize(antlr.Token tok)
|
void |
print(java.lang.String[] tokenNames,
boolean withSiblings)
|
void |
print(java.lang.String[] tokenNames,
java.io.PrintStream out,
int level,
boolean withSiblings)
|
void |
queryChildren()
Reads column and line from children if its own are 0. |
void |
remove()
Removes AST from tree |
java.lang.Object |
removeAttribute(java.lang.Object key)
|
void |
setAttribute(java.lang.Object key,
java.lang.Object value)
|
void |
setFirstChild(antlr.collections.AST c)
|
void |
setNextSibling(antlr.collections.AST n)
|
protected void |
setParent(AST parent)
|
protected void |
setPrevSibling(AST prevSibling)
|
void |
setSourceURL(java.lang.String sourceURL)
|
void |
show(java.lang.String[] tokenNames)
|
void |
showWithSiblings(java.lang.String title,
java.lang.String[] tokenNames)
|
protected void |
tabs(java.io.PrintStream out,
int level)
|
protected void |
visit(java.lang.String[] tokenNames,
AST node,
int level,
java.io.PrintStream out)
|
protected void |
visitAll(java.lang.String[] tokenNames,
AST node,
int level,
java.io.PrintStream out)
|
| Methods inherited from class antlr.CommonAST |
|---|
getText, getType, initialize, setText, setType |
| Methods inherited from class antlr.BaseAST |
|---|
decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AST()
| Method Detail |
|---|
public void initialize(antlr.Token tok)
initialize in interface antlr.collections.ASTinitialize in class antlr.CommonASTpublic void initialize(antlr.collections.AST node)
initialize in interface antlr.collections.ASTinitialize in class antlr.CommonASTpublic int getLine()
getLine in interface antlr.collections.ASTgetLine in interface SourceMarkergetLine in class antlr.BaseASTpublic int getColumn()
getColumn in interface antlr.collections.ASTgetColumn in interface SourceMarkergetColumn in class antlr.BaseASTpublic Token getToken()
public int getLeftColumn()
public AST getParent()
protected void setParent(AST parent)
public void addChild(antlr.collections.AST node)
addChild in interface antlr.collections.ASTaddChild in class antlr.BaseASTpublic void setFirstChild(antlr.collections.AST c)
setFirstChild in interface antlr.collections.ASTsetFirstChild in class antlr.BaseASTpublic void setNextSibling(antlr.collections.AST n)
setNextSibling in interface antlr.collections.ASTsetNextSibling in class antlr.BaseASTpublic AST getPrevSibling()
protected void setPrevSibling(AST prevSibling)
public void remove()
public void queryChildren()
public java.lang.String getSourceURL()
getSourceURL in interface SourceMarkerpublic void setSourceURL(java.lang.String sourceURL)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int getSize()
public Token getFirstToken()
public Token getLastToken()
public java.lang.String getId()
public void enumerate()
public boolean accept(Visitor visitor)
accept in interface Visitablepublic java.lang.Integer getSourceId()
SourceMarker
getSourceId in interface SourceMarker
public void print(java.lang.String[] tokenNames,
boolean withSiblings)
public void print(java.lang.String[] tokenNames,
java.io.PrintStream out,
int level,
boolean withSiblings)
protected void tabs(java.io.PrintStream out,
int level)
protected void visit(java.lang.String[] tokenNames,
AST node,
int level,
java.io.PrintStream out)
protected void visitAll(java.lang.String[] tokenNames,
AST node,
int level,
java.io.PrintStream out)
public void show(java.lang.String[] tokenNames)
public void showWithSiblings(java.lang.String title,
java.lang.String[] tokenNames)
public void setAttribute(java.lang.Object key,
java.lang.Object value)
setAttribute in interface Attributablepublic java.lang.Object getAttribute(java.lang.Object key)
getAttribute in interface Attributablepublic java.lang.Object removeAttribute(java.lang.Object key)
removeAttribute in interface Attributablepublic AST find(int type)
type -
public AST findChild(int type)
type -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||