antlr

Class ParseTree

public abstract class ParseTree extends BaseAST

Method Summary
StringgetLeftmostDerivation(int maxSteps)
protected abstract intgetLeftmostDerivation(StringBuffer buf, int step)
Get derivation and return how many you did (less than requested for subtree roots.
StringgetLeftmostDerivationStep(int step)
Walk parse tree and return requested number of derivation steps.
voidinitialize(int i, String s)
voidinitialize(AST ast)
voidinitialize(Token token)

Method Detail

getLeftmostDerivation

public String getLeftmostDerivation(int maxSteps)

getLeftmostDerivation

protected abstract int getLeftmostDerivation(StringBuffer buf, int step)
Get derivation and return how many you did (less than requested for subtree roots.

getLeftmostDerivationStep

public 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.

initialize

public void initialize(int i, String s)

initialize

public void initialize(AST ast)

initialize

public void initialize(Token token)