ANTLR3_TREE_NODE_STREAM_struct - Man Page
Synopsis
#include <antlr3commontreenodestream.h>
Data Fields
pANTLR3_BASE_TREE(* _LT )(struct ANTLR3_TREE_NODE_STREAM_struct *tns, ANTLR3_INT32 k)
Get tree node at current input pointer + i ahead where i=1 is next node.
pANTLR3_COMMON_TREE_NODE_STREAM ctns
Any interface that implements this interface (is a super structure containing this structure), may store the pointer to itself here in the super pointer, which is not used by the tree node stream.
void(* free )(struct ANTLR3_TREE_NODE_STREAM_struct *tns)
Release up any and all space the the interface allocate, including for this structure.
pANTLR3_BASE_TREE(* get )(struct ANTLR3_TREE_NODE_STREAM_struct *tns, ANTLR3_INT32 i)
Get a tree node at an absolute index i; 0..n-1.
pANTLR3_BASE_TREE_ADAPTOR(* getTreeAdaptor )(struct ANTLR3_TREE_NODE_STREAM_struct *tns)
What adaptor can tell me how to interpret/navigate nodes and trees.
pANTLR3_BASE_TREE(* getTreeSource )(struct ANTLR3_TREE_NODE_STREAM_struct *tns)
Where is this stream pulling nodes from? This is not the name, but the object that provides node objects.
pANTLR3_INT_STREAM istream
All input streams implement the ANTLR3_INT_STREAM interface...
void(* replaceChildren )(struct ANTLR3_TREE_NODE_STREAM_struct *tns, pANTLR3_BASE_TREE parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, pANTLR3_BASE_TREE t)
Replace from start to stop child index of parent with t, which might be a list.
void(* setUniqueNavigationNodes )(struct ANTLR3_TREE_NODE_STREAM_struct *tns, ANTLR3_BOOLEAN uniqueNavigationNodes)
As we flatten the tree, we use UP, DOWN nodes to represent the tree structure.
pANTLR3_STRING(* toString )(struct ANTLR3_TREE_NODE_STREAM_struct *tns)
pANTLR3_STRING(* toStringSS )(struct ANTLR3_TREE_NODE_STREAM_struct *tns, pANTLR3_BASE_TREE start, pANTLR3_BASE_TREE stop)
Return the text of all nodes from start to stop, inclusive.
void(* toStringWork )(struct ANTLR3_TREE_NODE_STREAM_struct *tns, pANTLR3_BASE_TREE start, pANTLR3_BASE_TREE stop, pANTLR3_STRING buf)
Return the text of all nodes from start to stop, inclusive, into the supplied buffer.
Field Documentation
pANTLR3_BASE_TREE(* ANTLR3_TREE_NODE_STREAM_struct::_LT) (struct ANTLR3_TREE_NODE_STREAM_struct *tns, ANTLR3_INT32 k)
Get tree node at current input pointer + i ahead where i=1 is next node. i<0 indicates nodes in the past. So LT(-1) is previous node, but implementations are not required to provide results for k < -1. LT(0) is undefined. For i>=n, return null. Return NULL for LT(0) and any index that results in an absolute address that is negative (beyond the start of the list).
This is analogous to the LT() method of the TokenStream, but this returns a tree node instead of a token. Makes code gen identical for both parser and tree grammars. :)
Referenced by _LA(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3RecognitionExceptionNew(), getCurrentInputSymbol(), and getMissingSymbol().
pANTLR3_COMMON_TREE_NODE_STREAM ANTLR3_TREE_NODE_STREAM_struct::ctns
Any interface that implements this interface (is a super structure containing this structure), may store the pointer to itself here in the super pointer, which is not used by the tree node stream. This will point to an implementation of ANTLR3_COMMON_TREE_NODE_STREAM in this case.
Referenced by _LT(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), consume(), get(), getCurrentInputSymbol(), getMissingSymbol(), getTreeAdaptor(), getTreeSource(), LB(), mark(), seek(), setUniqueNavigationNodes(), size(), tindex(), toString(), toStringSS(), and toStringWork().
void(* ANTLR3_TREE_NODE_STREAM_struct::free) (struct ANTLR3_TREE_NODE_STREAM_struct *tns)
Release up any and all space the the interface allocate, including for this structure.
Referenced by antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), and antlr3TreeNodeStreamNew().
pANTLR3_BASE_TREE(* ANTLR3_TREE_NODE_STREAM_struct::get) (struct ANTLR3_TREE_NODE_STREAM_struct *tns, ANTLR3_INT32 i)
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.
Referenced by antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream().
pANTLR3_BASE_TREE_ADAPTOR(* ANTLR3_TREE_NODE_STREAM_struct::getTreeAdaptor) (struct ANTLR3_TREE_NODE_STREAM_struct *tns)
What adaptor can tell me how to interpret/navigate nodes and trees. E.g., get text of a node.
Referenced by antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), and replaceChildren().
pANTLR3_BASE_TREE(* ANTLR3_TREE_NODE_STREAM_struct::getTreeSource) (struct ANTLR3_TREE_NODE_STREAM_struct *tns)
Where is this stream pulling nodes from? This is not the name, but the object that provides node objects.
Referenced by antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream().
pANTLR3_INT_STREAM ANTLR3_TREE_NODE_STREAM_struct::istream
All input streams implement the ANTLR3_INT_STREAM interface...
Referenced by alreadyParsedRule(), antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3RecognitionExceptionNew(), consumeUntil(), consumeUntilSet(), displayRecognitionError(), mark(), match(), matchAny(), memoize(), pop(), push(), recover(), recoverFromMismatchedElement(), recoverFromMismatchedSet(), recoverFromMismatchedToken(), reset(), and synpred().
void(* ANTLR3_TREE_NODE_STREAM_struct::replaceChildren) (struct ANTLR3_TREE_NODE_STREAM_struct *tns, pANTLR3_BASE_TREE parent, ANTLR3_INT32 startChildIndex, ANTLR3_INT32 stopChildIndex, pANTLR3_BASE_TREE t)
Replace from start to stop child index of parent with t, which might be a list. Number of children may be different after this call. The stream is notified because it is walking the tree and might need to know you are monkeying with the underlying tree. Also, it might be able to modify the node stream to avoid restreaming for future phases.
If parent is null, don't do anything; must be at root of overall tree. Can't replace whatever points to the parent externally. Do nothing.
Referenced by antlr3TreeNodeStreamNew().
pANTLR3_STRING(* ANTLR3_TREE_NODE_STREAM_struct::toString) (struct ANTLR3_TREE_NODE_STREAM_struct *tns)
Referenced by antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream().
pANTLR3_STRING(* ANTLR3_TREE_NODE_STREAM_struct::toStringSS) (struct ANTLR3_TREE_NODE_STREAM_struct *tns, pANTLR3_BASE_TREE start, pANTLR3_BASE_TREE stop)
Return the text of all nodes from start to stop, inclusive. If the stream does not buffer all the nodes then it can still walk recursively from start until stop. You can always return null or '' too, but users should not access $ruleLabel.text in an action of course in that case.
Referenced by antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), and toString().
void(* ANTLR3_TREE_NODE_STREAM_struct::toStringWork) (struct ANTLR3_TREE_NODE_STREAM_struct *tns, pANTLR3_BASE_TREE start, pANTLR3_BASE_TREE stop, pANTLR3_STRING buf)
Return the text of all nodes from start to stop, inclusive, into the supplied buffer. If the stream does not buffer all the nodes then it can still walk recursively from start until stop. You can always return null or '' too, but users should not access $ruleLabel.text in an action of course in that case.
Referenced by antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), toStringSS(), and toStringWork().
Author
Generated automatically by Doxygen for ANTLR3C from the source code.
Referenced By
The man page antlr3-ctns(3) is an alias of ANTLR3_TREE_NODE_STREAM_struct(3).