|
Generic Interpreter 0.9 Protected API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gi.Grammar.ParseTree
This class implements a
constructed by interpreting a source stream.ParseTree
Field Summary | |
Object |
attribute
The attribute at the root of this ParseTree . |
Grammar.ParseTree[] |
phrase
The subtrees of the root of this ParseTree . |
Object |
symbol
The symbol at the root of this ParseTree . |
Method Summary | |
String |
toString()
Returns a string representation of this ParseTree . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public Object attribute
The attribute at the root of this ParseTree
. If symbol
is a terminal, attribute
is initially the source word symbol
matches; otherwise, attribute
is initially null
. attribute
may be modified when interpreting by evaluation of embedded Semantics
.
public Grammar.ParseTree[] phrase
The subtrees of the root of this ParseTree
. If symbol
is a nonterminal, phrase
is the array of subtrees produced by symbol
; otherwise, phrase
is null
.
public Object symbol
The symbol at the root of this ParseTree
. symbol
can be a nonterminal, a terminal or Semantics
.
Method Detail |
public String toString()
Returns a string representation of this ParseTree
. The symbols in the ParseTree
are shown in outline form, with children below their parent indented two columns. Each symbol is followed by its attribute value, if it is not null
and differs from the symbol.
toString
in class Object
ParseTree
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |