fri.patterns.interpreter.parsergenerator.lexer
Class ResultTree

java.lang.Object
  |
  +--fri.patterns.interpreter.parsergenerator.lexer.ResultTree

public class ResultTree
extends java.lang.Object

Lexer result tree element, holding texts, its line/column range, and result children.

Author:
Fritz Ritzberger, 2003

Method Summary
 java.lang.Object getChild(int i)
          Returns the child at index i of this element, which could be StringBuffer or ResultTree.
 int getChildCount()
          Returns the count of children of this element.
 Token.Range getRange()
          Returns the character- or byte-range within input where the token was found.
 Rule getRule()
          Returns the rule this ResultTree was built from.
 boolean hasText()
          Returns true if this ResultTree or any of its children has text.
 java.lang.String toString()
          Returns the String text of this ResultTree, including any text of its children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getRange

public Token.Range getRange()
Returns the character- or byte-range within input where the token was found.


hasText

public boolean hasText()
Returns true if this ResultTree or any of its children has text.


toString

public java.lang.String toString()
Returns the String text of this ResultTree, including any text of its children.

Overrides:
toString in class java.lang.Object

getRule

public Rule getRule()
Returns the rule this ResultTree was built from.


getChild

public java.lang.Object getChild(int i)
Returns the child at index i of this element, which could be StringBuffer or ResultTree.


getChildCount

public int getChildCount()
Returns the count of children of this element.