org.sc3d.apt.sss.v3
Class Tree

java.lang.Object
  extended by org.sc3d.apt.sss.v3.Tree
Direct Known Subclasses:
Tree.NonTerminal, Tree.Terminal

public abstract class Tree
extends java.lang.Object

Represents the parse-tree of a Sentence. This is the return type of 'Parser.parseTokens()'. Its structure closely mimics that of 'Grammar'. 'null' represents a Sentence that contains errors.


Nested Class Summary
static class Tree.NonTerminal
          The subclass of Tree with 'isTerminal==false', which represents zero or more parse-trees all matching the same non-terminal of the grammar.
static class Tree.Production
          Represents something constructed using a Grammar.Production from a sequence of smaller things.
static class Tree.Terminal
          The subclass of Tree with 'isTerminal==true', which represents a single Token.
 
Field Summary
 boolean isTerminal
          'true' if this Tree is a single Token corresponding to a Terminal of the grammar, otherwise 'false'.
 
Method Summary
 java.lang.String toString()
          Returns a String representation of this Tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isTerminal

public final boolean isTerminal
'true' if this Tree is a single Token corresponding to a Terminal of the grammar, otherwise 'false'.

Method Detail

toString

public java.lang.String toString()
Returns a String representation of this Tree.

Overrides:
toString in class java.lang.Object