ITreeNodeStream Properties |
The ITreeNodeStream type exposes the following members.
Name | Description | |
---|---|---|
![]() | Count |
Only makes sense for streams that buffer everything up probably, but
might be useful to display the entire stream or for testing. This
value includes a single EOF.
(Inherited from IIntStream.) |
![]() | Index |
Return the current input symbol index 0..n where n indicates the
last symbol has been read. The index is the symbol about to be
read not the most recently read symbol.
(Inherited from IIntStream.) |
![]() | Item |
Get a tree node at an absolute index i; 0..n-1.
If you don't want to buffer up nodes, then this method makes no
sense for you.
|
![]() | SourceName |
Where are you getting symbols from? Normally, implementations will
pass the buck all the way to the lexer who can ask its input stream
for the file name or whatever.
(Inherited from IIntStream.) |
![]() | TokenStream |
If the tree associated with this stream was created from a
{@link TokenStream}, you can specify it here. Used to do rule
{@code $text} attribute in tree parser. Optional unless you use tree
parser rule {@code $text} attribute or {@code output=template} and
{@code rewrite=true} options.
|
![]() | TreeAdaptor |
What adaptor can tell me how to interpret/navigate nodes and
trees. E.g., get text of a node.
|
![]() | TreeSource |
Where is this stream pulling nodes from? This is not the name, but
the object that provides node objects.
|
![]() | UniqueNavigationNodes |
As we flatten the tree, we use {@link Token#UP}, {@link Token#DOWN} nodes
to represent the tree structure. When debugging we need unique nodes so
we have to instantiate new ones. When doing normal tree parsing, it's
slow and a waste of memory to create unique navigation nodes. Default
should be {@code false}.
|