Package antlr
Class ParseTree
- java.lang.Object
-
- antlr.BaseAST
-
- antlr.ParseTree
-
- All Implemented Interfaces:
AST
,java.io.Serializable
- Direct Known Subclasses:
ParseTreeRule
,ParseTreeToken
public abstract class ParseTree extends BaseAST
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ParseTree()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getLeftmostDerivation(int maxSteps)
protected abstract int
getLeftmostDerivation(java.lang.StringBuffer buf, int step)
Get derivation and return how many you did (less than requested for subtree roots.java.lang.String
getLeftmostDerivationStep(int step)
Walk parse tree and return requested number of derivation steps.void
initialize(int i, java.lang.String s)
void
initialize(AST ast)
void
initialize(Token token)
-
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getColumn, getFirstChild, getLine, getNextSibling, getNumberOfChildren, getText, getTokenNames, getType, removeChildren, setFirstChild, setNextSibling, setText, setType, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
-
-
-
-
Method Detail
-
getLeftmostDerivationStep
public java.lang.String getLeftmostDerivationStep(int step)
Walk parse tree and return requested number of derivation steps. If steps <= 0, return node text. If steps == 1, return derivation string at step.
-
getLeftmostDerivation
public java.lang.String getLeftmostDerivation(int maxSteps)
-
getLeftmostDerivation
protected abstract int getLeftmostDerivation(java.lang.StringBuffer buf, int step)
Get derivation and return how many you did (less than requested for subtree roots.
-
initialize
public void initialize(int i, java.lang.String s)
- Specified by:
initialize
in interfaceAST
- Specified by:
initialize
in classBaseAST
-
initialize
public void initialize(AST ast)
- Specified by:
initialize
in interfaceAST
- Specified by:
initialize
in classBaseAST
-
initialize
public void initialize(Token token)
- Specified by:
initialize
in interfaceAST
- Specified by:
initialize
in classBaseAST
-
-