Home | Download | News | Wiki | About ANTLR | Feedback | Support | Bugs


Latest version is 2.7.7.
Download now! »

Download
» Home
» Download
» News
»Using ANTLR
» Documentation
» Wiki
» FAQ
» Articles
» Grammars
» File Sharing
» Code API
» Tech Support
» Bug Tracking
»About ANTLR
» What is ANTLR
» Why use ANTLR
» Showcase
» Testimonials
» Getting Started
» Software License
» ANTLR WebLogs
» ANTLR Workshops
»StringTemplate
»TML
»PCCTS
»Feedback
»Credits
»Contact


Support StringTemplate, ANTLR Project by making a donation! Terence often pays for things like the antlr.org server, conference travel, and this site design (that alone cost US$1000). Buy him a beer and pizza remotely ;)

Search



ParseTree


antlr
Class ParseTree

java.lang.Object
  extended byantlr.BaseAST
      extended byantlr.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
ParseTree()
           
 
Method Summary
 java.lang.String getLeftmostDerivation(int maxSteps)
           
 java.lang.String getLeftmostDerivationStep(int step)
          Walk parse tree and return requested number of derivation steps.
 void initialize(AST ast)
           
 void initialize(int i, java.lang.String s)
           
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParseTree

public ParseTree()
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)

initialize

public void initialize(int i,
                       java.lang.String s)
Specified by:
initialize in interface AST
Specified by:
initialize in class BaseAST

initialize

public void initialize(AST ast)
Specified by:
initialize in interface AST
Specified by:
initialize in class BaseAST

initialize

public void initialize(Token token)
Specified by:
initialize in interface AST
Specified by:
initialize in class BaseAST