antlr

Class CommonAST

Implemented Interfaces:
AST, Serializable
Known Direct Subclasses:
CommonASTWithHiddenTokens

public class CommonAST
extends BaseAST

Common AST node implementation

Field Summary

(package private) String
text
(package private) int
ttype

Fields inherited from class antlr.BaseAST

down, right

Constructor Summary

CommonAST()
CommonAST(Token tok)

Method Summary

String
getText()
Get the token text for this node
int
getType()
Get the token type for this node
void
initialize(Token tok)
void
initialize(AST t)
void
initialize(int t, String txt)
void
setText(String text_)
Set the token text for this node
void
setType(int ttype_)
Set the token type for this node

Methods inherited from class antlr.BaseAST

addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getColumn, getFirstChild, getLine, getNextSibling, getNumberOfChildren, getText, getTokenNames, getType, initialize, initialize, initialize, removeChildren, setFirstChild, setNextSibling, setText, setType, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen

Field Details

text

(package private)  String text

ttype

(package private)  int ttype

Constructor Details

CommonAST

public CommonAST()

CommonAST

public CommonAST(Token tok)

Method Details

getText

public String getText()
Get the token text for this node
Specified by:
getText in interface AST
Overrides:
getText in interface BaseAST

getType

public int getType()
Get the token type for this node
Specified by:
getType in interface AST
Overrides:
getType in interface BaseAST

initialize

public void initialize(Token tok)
Specified by:
initialize in interface AST
Overrides:
initialize in interface BaseAST

initialize

public void initialize(AST t)
Specified by:
initialize in interface AST
Overrides:
initialize in interface BaseAST

initialize

public void initialize(int t,
                       String txt)
Specified by:
initialize in interface AST
Overrides:
initialize in interface BaseAST

setText

public void setText(String text_)
Set the token text for this node
Specified by:
setText in interface AST
Overrides:
setText in interface BaseAST

setType

public void setType(int ttype_)
Set the token type for this node
Specified by:
setType in interface AST
Overrides:
setType in interface BaseAST