ANTLR3_COMMON_TREE_NODE_STREAM_struct - Online Linux Manual PageSection : 3
Updated : Tue Jan 26 2021
Source : Version 3.3.1
Note : ANTLR3C

NAMEANTLR3_COMMON_TREE_NODE_STREAM_struct

SYNOPSIS
#include <antlr3commontreenodestream​.h>

Data FieldsANTLR3_MARKER absoluteNodeIndex
What node index did we just consume? i=0​.​.n-1 for n node trees​.
pANTLR3_BASE_TREE_ADAPTOR adaptor
Pointer to tree adaptor interface that manipulates/builds the tree​.
void(* addLookahead )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, pANTLR3_BASE_TREE node)
void(* addNavigationNode )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_UINT32 ttype)
ANTLR3_INT32 currentChildIndex
Which child are we currently visiting? If -1 we have not visited this node yet; next consume() request will set currentIndex to 0​.
pANTLR3_BASE_TREE currentNode
Which node are we currently visiting?
ANTLR3_COMMON_TREE DOWN
Dummy tree node that indicates a descent into a child tree​.
ANTLR3_COMMON_TREE EOF_NODE
Dummy tree node that indicates the termination point of the tree​.
void(* fill )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_INT32 k)
void(* free )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
ANTLR3_UINT32(* getLookaheadSize )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
pANTLR3_BASE_TREE(* handleRootnode )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
ANTLR3_BOOLEAN(* hasNext )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
ANTLR3_BOOLEAN(* hasUniqueNavigationNodes )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
ANTLR3_UINT32 head
lookAhead[head] is the first symbol of lookahead, LT(1)​.
ANTLR3_COMMON_TREE INVALID_NODE
Dummy node that is returned if we need to indicate an invalid node for any reason​.
ANTLR3_BOOLEAN isRewriter
Indicates whether this node stream was derived from a prior node stream to be used by a rewriting tree parser for instance​.
pANTLR3_BASE_TREE * lookAhead
Buffer tree node stream for use with LT(i)​.
ANTLR3_UINT32 lookAheadLength
Number of elements available in the lookahead buffer at any point in time​.
pANTLR3_VECTOR markers
Calls to mark() may be nested so we have to track a stack of them​.
pANTLR3_BASE_TREE(* newDownNode )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
pANTLR3_BASE_TREE(* newUpNode )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
pANTLR3_BASE_TREE(* next )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
pANTLR3_VECTOR nodes
The complete mapping from stream index to tree node​.
pANTLR3_STACK nodeStack
As we walk down the nodes, we must track parent nodes so we know where to go after walking the last child of a node​.
ANTLR3_INT32 p
The current index into the nodes vector of the current tree we are parsing and possibly rewriting​.
ANTLR3_INT32(* pop )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
pANTLR3_BASE_TREE previousNode
Which node did we last visit? Used for LT(-1)
void(* push )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_INT32 index)
void(* reset )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)
pANTLR3_BASE_TREE root
Which tree are we navigating ?
pANTLR3_STRING_FACTORY stringFactory
String factory for use by anything that wishes to create strings such as a tree representation or some copy of the text etc​.
void * super
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 common tree node stream​.
ANTLR3_UINT32 tail
Add new lookahead at lookahead[tail]​.
pANTLR3_TREE_NODE_STREAM tnstream
Pointer to the tree node stream interface​.
ANTLR3_BOOLEAN uniqueNavigationNodes
If set to ANTLR3_TRUE then the navigation nodes UP, DOWN are duplicated rather than reused within the tree​.
ANTLR3_COMMON_TREE UP
Dummy tree node that indicates a descent up to a parent tree​.
pANTLR3_BASE_TREE(* visitChild )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_UINT32 child)
void(* walkBackToMostRecentNodeWithUnvisitedChildren )(struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)

Field Documentation

ANTLR3_MARKER ANTLR3_COMMON_TREE_NODE_STREAM_struct::absoluteNodeIndexWhat node index did we just consume? i=0​.​.n-1 for n node trees​. IntStream​.next is hence 1 + this value​. Size will be same​.

pANTLR3_BASE_TREE_ADAPTOR ANTLR3_COMMON_TREE_NODE_STREAM_struct::adaptorPointer to tree adaptor interface that manipulates/builds the tree​. Referenced by antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), fillBuffer(), and getTreeAdaptor()​.

void(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::addLookahead) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, pANTLR3_BASE_TREE node)

void(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::addNavigationNode) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_UINT32 ttype)Referenced by antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), and fillBuffer()​.

ANTLR3_INT32 ANTLR3_COMMON_TREE_NODE_STREAM_struct::currentChildIndexWhich child are we currently visiting? If -1 we have not visited this node yet; next consume() request will set currentIndex to 0​.

pANTLR3_BASE_TREE ANTLR3_COMMON_TREE_NODE_STREAM_struct::currentNodeWhich node are we currently visiting?

ANTLR3_COMMON_TREE ANTLR3_COMMON_TREE_NODE_STREAM_struct::DOWNDummy tree node that indicates a descent into a child tree​. Initialized by a call to create a new interface​. Referenced by addNavigationNode(), antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream()​.

ANTLR3_COMMON_TREE ANTLR3_COMMON_TREE_NODE_STREAM_struct::EOF_NODEDummy tree node that indicates the termination point of the tree​. Initialized by a call to create a new interface​. Referenced by _LT(), antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), and getMissingSymbol()​.

void(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::fill) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_INT32 k)

void(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::free) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)Referenced by antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream()​.

ANTLR3_UINT32(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::getLookaheadSize) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)Referenced by antlr3CommonTreeNodeStreamNewStream()​.

pANTLR3_BASE_TREE(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::handleRootnode) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)

ANTLR3_BOOLEAN(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::hasNext) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)

ANTLR3_BOOLEAN(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::hasUniqueNavigationNodes) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)Referenced by addNavigationNode(), antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream()​.

ANTLR3_UINT32 ANTLR3_COMMON_TREE_NODE_STREAM_struct::headlookAhead[head] is the first symbol of lookahead, LT(1)​. Referenced by getLookaheadSize()​.

ANTLR3_COMMON_TREE ANTLR3_COMMON_TREE_NODE_STREAM_struct::INVALID_NODEDummy node that is returned if we need to indicate an invalid node for any reason​. Referenced by _LT(), antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), and LB()​.

ANTLR3_BOOLEAN ANTLR3_COMMON_TREE_NODE_STREAM_struct::isRewriterIndicates whether this node stream was derived from a prior node stream to be used by a rewriting tree parser for instance​. If this flag is set to ANTLR3_TRUE, then when this stream is closed it will not free the root tree as this tree always belongs to the origniating node stream​. Referenced by antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNewStream(), and reset()​.

pANTLR3_BASE_TREE* ANTLR3_COMMON_TREE_NODE_STREAM_struct::lookAheadBuffer tree node stream for use with LT(i)​. This list grows to fit new lookahead depths, but consume() wraps like a circular buffer​.

ANTLR3_UINT32 ANTLR3_COMMON_TREE_NODE_STREAM_struct::lookAheadLengthNumber of elements available in the lookahead buffer at any point in time​. This is the current size of the array​. Referenced by getLookaheadSize()​.

pANTLR3_VECTOR ANTLR3_COMMON_TREE_NODE_STREAM_struct::markersCalls to mark() may be nested so we have to track a stack of them​. The marker is an index into this stack​. Index 0 is the first marker​. This is a List<TreeWalkState> Referenced by antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream()​.

pANTLR3_BASE_TREE(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::newDownNode) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)Referenced by addNavigationNode(), antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream()​.

pANTLR3_BASE_TREE(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::newUpNode) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)Referenced by addNavigationNode(), antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream()​.

pANTLR3_BASE_TREE(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::next) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)

pANTLR3_VECTOR ANTLR3_COMMON_TREE_NODE_STREAM_struct::nodesThe complete mapping from stream index to tree node​. This buffer includes pointers to DOWN, UP, and EOF nodes​. It is built upon ctor invocation​. The elements are type Object as we don't what the trees look like​. Load upon first need of the buffer so we can set token types of interest for reverseIndexing​. Slows us down a wee bit to do all of the if p==-1 testing everywhere though, though in C you won't really be able to measure this​. Must be freed when the tree node stream is torn down​. Referenced by _LT(), addNavigationNode(), antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), fillBuffer(), get(), LB(), and size()​.

pANTLR3_STACK ANTLR3_COMMON_TREE_NODE_STREAM_struct::nodeStackAs we walk down the nodes, we must track parent nodes so we know where to go after walking the last child of a node​. When visiting a child, push current node and current index (current index is first stored in the tree node structure to avoid two stacks​. Referenced by antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), pop(), push(), and reset()​.

ANTLR3_INT32 ANTLR3_COMMON_TREE_NODE_STREAM_struct::pThe current index into the nodes vector of the current tree we are parsing and possibly rewriting​. Referenced by _LT(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), consume(), fillBufferRoot(), get(), LB(), mark(), push(), reset(), seek(), size(), and tindex()​.

ANTLR3_INT32(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::pop) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)Referenced by antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream()​.

pANTLR3_BASE_TREE ANTLR3_COMMON_TREE_NODE_STREAM_struct::previousNodeWhich node did we last visit? Used for LT(-1)

void(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::push) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_INT32 index)Referenced by antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream()​.

void(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::reset) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)Referenced by antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), and setTreeNodeStream()​.

pANTLR3_BASE_TREE ANTLR3_COMMON_TREE_NODE_STREAM_struct::rootWhich tree are we navigating ? Referenced by antlr3CommonTreeNodeStreamNewStream(), antlr3CommonTreeNodeStreamNewTree(), fillBufferRoot(), getTreeSource(), and toString()​.

pANTLR3_STRING_FACTORY ANTLR3_COMMON_TREE_NODE_STREAM_struct::stringFactoryString factory for use by anything that wishes to create strings such as a tree representation or some copy of the text etc​. Referenced by antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), toStringSS(), and toStringWork()​.

void* ANTLR3_COMMON_TREE_NODE_STREAM_struct::superAny 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 common tree node stream​. Referenced by antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream()​.

ANTLR3_UINT32 ANTLR3_COMMON_TREE_NODE_STREAM_struct::tailAdd new lookahead at lookahead[tail]​. tail wraps around at the end of the lookahead buffer so tail could be less than head​. Referenced by getLookaheadSize()​.

pANTLR3_TREE_NODE_STREAM ANTLR3_COMMON_TREE_NODE_STREAM_struct::tnstreamPointer to the tree node 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()​.

ANTLR3_BOOLEAN ANTLR3_COMMON_TREE_NODE_STREAM_struct::uniqueNavigationNodesIf set to ANTLR3_TRUE then the navigation nodes UP, DOWN are duplicated rather than reused within the tree​. Referenced by antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), hasUniqueNavigationNodes(), and setUniqueNavigationNodes()​.

ANTLR3_COMMON_TREE ANTLR3_COMMON_TREE_NODE_STREAM_struct::UPDummy tree node that indicates a descent up to a parent tree​. Initialized by a call to create a new interface​. Referenced by addNavigationNode(), antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNew(), and antlr3CommonTreeNodeStreamNewStream()​.

pANTLR3_BASE_TREE(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::visitChild) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns, ANTLR3_UINT32 child)

void(* ANTLR3_COMMON_TREE_NODE_STREAM_struct::walkBackToMostRecentNodeWithUnvisitedChildren) (struct ANTLR3_COMMON_TREE_NODE_STREAM_struct *ctns)

AuthorGenerated automatically by Doxygen for ANTLR3C from the source code​.
0
Johanes Gumabo
Data Size   :   60,935 byte
man-antlr3-visitChild.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 193,546
Visitor ID   :     :  
Visitor IP   :   3.145.84.128   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.