Click or drag to resize

ITreeNodeStream Properties

The ITreeNodeStream type exposes the following members.

Properties
  NameDescription
Public propertyCount
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.)
Public propertyIndex
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.)
Public propertyItem
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.
Public propertySourceName
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.)
Public propertyTokenStream
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.
Public propertyTreeAdaptor
What adaptor can tell me how to interpret/navigate nodes and trees. E.g., get text of a node.
Public propertyTreeSource
Where is this stream pulling nodes from? This is not the name, but the object that provides node objects.
Public propertyUniqueNavigationNodes
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}.
Top
See Also