| Modifier and Type | Field and Description |
|---|---|
| pack-priv TreeAdaptor | adaptor
What |
| protected IntArray | calls
Stack of indexes used for push/pop calls. |
| public static final int | |
| protected boolean | hasNilRoot
Tree |
| public static final int | |
| protected TreeIterator | it
The |
| protected int | level
Tracks tree depth. |
| protected Object | previousLocationElement
Tracks the last node before the start of |
| protected Object | root
Pull nodes from which tree? |
| protected TokenStream | tokens
If this tree (root) was created from a |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | get(int i)
Implements org. i; 0..n-1.
|
| public Object | getKnownPositionElement(boolean
if allowApproximateLocation)false, this method returns
null if an element containing exact information about the current
position is not availableImplements org. |
| public String | getSourceName()
Implements org. |
| public TokenStream | getTokenStream()
Implements org. TokenStream, you can specify it here.
|
| public TreeAdaptor | getTreeAdaptor()
Implements org. |
| public Object | getTreeSource()
Implements org. |
| public boolean | hasPositionInformation(Object
the element to check node)Implements org. element contains concrete position
information.
|
| public boolean | |
| public int | LA(int i)
Implements org. |
| public Object | nextElement()
Implements abstract org. |
| public int | |
| public void | |
| public Object | remove()
Overrides org. FastQueue#remove(); it's the same, just checks for backtracking.
|
| public void | replaceChildren(Object parent, int startChildIndex, int stopChildIndex, Object t)
Implements org. parent from index startChildIndex to
stopChildIndex with t, which might be a list.
|
| public void | reset()
Overrides org. Implements org. |
| public void | |
| public void | |
| public void | setUniqueNavigationNodes(boolean uniqueNavigationNodes)
Implements org. Token#UP, Token#DOWN nodes
to represent the tree structure.
|
| public String | toString(Object start, Object stop)
Implements org. start to stop,
inclusive.
|
| public String |
| adaptor | back to summary |
|---|---|
| pack-priv TreeAdaptor adaptor What | |
| calls | back to summary |
|---|---|
| protected IntArray calls Stack of indexes used for push/pop calls. | |
| DEFAULT_INITIAL_BUFFER_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_INITIAL_BUFFER_SIZE | |
| hasNilRoot | back to summary |
|---|---|
| protected boolean hasNilRoot Tree | |
| INITIAL_CALL_STACK_SIZE | back to summary |
|---|---|
| public static final int INITIAL_CALL_STACK_SIZE | |
| it | back to summary |
|---|---|
| protected TreeIterator it The | |
| level | back to summary |
|---|---|
| protected int level Tracks tree depth. Level=0 means we're at root node level. | |
| previousLocationElement | back to summary |
|---|---|
| protected Object previousLocationElement Tracks the last node before the start of | |
| root | back to summary |
|---|---|
| protected Object root Pull nodes from which tree? | |
| tokens | back to summary |
|---|---|
| protected TokenStream tokens If this tree (root) was created from a | |
| CommonTreeNodeStream | back to summary |
|---|---|
| public CommonTreeNodeStream(Object tree) | |
| CommonTreeNodeStream | back to summary |
|---|---|
| public CommonTreeNodeStream(TreeAdaptor adaptor, Object tree) | |
| get | back to summary |
|---|---|
| public Object get(int i) Implements org. Doc from org. Get a tree node at an absolute index
| |
| getKnownPositionElement | back to summary |
|---|---|
| public Object getKnownPositionElement(boolean allowApproximateLocation) Implements org. Returns an element containing position information. If
| |
| getSourceName | back to summary |
|---|---|
| public String getSourceName() Implements org. Doc from org. 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.
| |
| getTokenStream | back to summary |
|---|---|
| public TokenStream getTokenStream() Implements org. Doc from org. If the tree associated with this stream was created from a
| |
| getTreeAdaptor | back to summary |
|---|---|
| public TreeAdaptor getTreeAdaptor() Implements org. Doc from org. What adaptor can tell me how to interpret/navigate nodes and trees. E.g., get text of a node.
| |
| getTreeSource | back to summary |
|---|---|
| public Object getTreeSource() Implements org. Doc from org. Where is this stream pulling nodes from? This is not the name, but the object that provides node objects.
| |
| hasPositionInformation | back to summary |
|---|---|
| public boolean hasPositionInformation(Object node) Implements org. Doc from org. Determines if the specified | |
| isEOF | back to summary |
|---|---|
| public boolean isEOF(Object o) Implements abstract org.
| |
| LA | back to summary |
|---|---|
| public int LA(int i) Implements org. Doc from org. Get int at current input pointer + i ahead where i=1 is next int. Negative indexes are allowed. LA(-1) is previous token (token just matched). LA(-i) where i is before first token should yield -1, invalid char / EOF.
| |
| nextElement | back to summary |
|---|---|
| public Object nextElement() Implements abstract org. Pull elements from tree iterator. Track tree level 0..max_level. If nil rooted tree, don't give initial nil and DOWN nor final UP.
| |
| pop | back to summary |
|---|---|
| public int pop() Seek back to previous index saved during last | |
| push | back to summary |
|---|---|
| public void push(int index) Make stream jump to a new location, saving old location. Switch back with pop(). | |
| remove | back to summary |
|---|---|
| public Object remove() Overrides org. Doc from org. Get and remove first element in queue; override
| |
| replaceChildren | back to summary |
|---|---|
| public void replaceChildren(Object parent, int startChildIndex, int stopChildIndex, Object t) Implements org. Doc from org. Replace children of
If
| |
| reset | back to summary |
|---|---|
| public void reset() Overrides org. Implements org. Doc from org. Reset the tree node stream in such a way that it acts like a freshly constructed stream.
| |
| setTokenStream | back to summary |
|---|---|
| public void setTokenStream(TokenStream tokens) | |
| setTreeAdaptor | back to summary |
|---|---|
| public void setTreeAdaptor(TreeAdaptor adaptor) | |
| setUniqueNavigationNodes | back to summary |
|---|---|
| public void setUniqueNavigationNodes(boolean uniqueNavigationNodes) Implements org. Doc from org. As we flatten the tree, we use
| |
| toString | back to summary |
|---|---|
| public String toString(Object start, Object stop) Implements org. Doc from org. Return the text of all nodes from
| |
| toTokenTypeString | back to summary |
|---|---|
| public String toTokenTypeString() For debugging; destructive: moves tree iterator to end. | |