antlr

Class ParseTreeRule

Implemented Interfaces:
AST, Serializable

public class ParseTreeRule
extends ParseTree

Field Summary

static int
INVALID_ALT
protected int
altNumber
protected String
ruleName

Fields inherited from class antlr.BaseAST

down, right

Constructor Summary

ParseTreeRule(String ruleName)
ParseTreeRule(String ruleName, int altNumber)

Method Summary

protected int
getLeftmostDerivation(StringBuffer buf, int step)
Do a step-first walk, building up a buffer of tokens until you've reached a particular step and print out any rule subroots insteads of descending.
String
getRuleName()
String
toString()

Methods inherited from class antlr.ParseTree

getLeftmostDerivation, getLeftmostDerivation, getLeftmostDerivationStep, initialize, initialize, initialize

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

INVALID_ALT

public static final int INVALID_ALT

Field Value:
-1


altNumber

protected int altNumber


ruleName

protected String ruleName

Constructor Details

ParseTreeRule

public ParseTreeRule(String ruleName)


ParseTreeRule

public ParseTreeRule(String ruleName,
                     int altNumber)

Method Details

getLeftmostDerivation

protected int getLeftmostDerivation(StringBuffer buf,
                                    int step)
Do a step-first walk, building up a buffer of tokens until you've reached a particular step and print out any rule subroots insteads of descending.
Overrides:
getLeftmostDerivation in interface ParseTree


getRuleName

public String getRuleName()


toString

public String toString()
Specified by:
toString in interface AST
Overrides:
toString in interface BaseAST