Package antlr.collections
Interface AST
- All Known Implementing Classes:
ASTNULLType
,BaseAST
,CommonAST
,CommonASTWithHiddenTokens
,ParseTree
,ParseTreeRule
,ParseTreeToken
public interface AST
Minimal AST node interface used by ANTLR AST generation
and tree-walker.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a (rightmost) child to this nodeboolean
boolean
equalsList
(AST t) boolean
boolean
equalsTree
(AST t) boolean
findAllPartial
(AST subtree) int
Get the first child of this node; null if no childrenint
getLine()
Get the next sibling in line after this oneint
Get number of children of this node; if leaf, returns 0getText()
Get the token text for this nodeint
getType()
Get the token type for this nodevoid
initialize
(int t, String txt) void
initialize
(AST t) void
initialize
(Token t) void
setFirstChild
(AST c) Set the first child of a node.void
Set the next sibling after this one.void
Set the token text for this nodevoid
setType
(int ttype) Set the token type for this nodetoString()
-
Method Details
-
addChild
Add a (rightmost) child to this node -
equals
-
equalsList
-
equalsListPartial
-
equalsTree
-
equalsTreePartial
-
findAll
-
findAllPartial
-
getFirstChild
AST getFirstChild()Get the first child of this node; null if no children -
getNextSibling
AST getNextSibling()Get the next sibling in line after this one -
getText
String getText()Get the token text for this node -
getType
int getType()Get the token type for this node -
getLine
int getLine()- Since:
- 2.7.3 Need for error handling
-
getColumn
int getColumn()- Since:
- 2.7.3 Need for error handling
-
getNumberOfChildren
int getNumberOfChildren()Get number of children of this node; if leaf, returns 0 -
initialize
-
initialize
-
initialize
-
setFirstChild
Set the first child of a node. -
setNextSibling
Set the next sibling after this one. -
setText
Set the token text for this node -
setType
void setType(int ttype) Set the token type for this node -
toString
String toString() -
toStringList
String toStringList() -
toStringTree
String toStringTree()
-