ANTLR3_COMMON_TREE_struct(3)
ANTLR3_COMMON_TREE_struct(3) π
okay bestie, sit DOWN, because we're talking about the ANTLR3C manual page for ANTLR3_COMMON_TREE_struct and it's literally the whole personality of the AST-producing parser π«Ά
β¨ NAME β¨
ANTLR3_COMMON_TREE_struct β interface for an ANTLR3 common tree, which is what gets passed around by the AST producing parser π³
πΈ SYNOPSIS πΈ
#include <antlr3commontree.h>
π Data Fields π
ANTLR3_BASE_TREE baseTreeβ an encapsulated BASE TREE structure (NOT a pointer) that does a whole lot of the dirty work of node management. To this we add just a few functions that are specific to the payload. πANTLR3_INT32 childIndexβ what index is this particular node in the child list it belongs to? πpANTLR3_ARBORETUM factoryβ pointer to the tree factory that manufactured this token. πpANTLR3_COMMON_TREE parentβ points to the node that has this node as a child. πΌANTLR3_MARKER startIndexβ start token index that encases this tree. βANTLR3_MARKER stopIndexβ end token that encases this tree. πvoid * superβ not used by ANTLR, but if a super structure is created above this structure, it can be used to point to the start of the super structure, where additional data and function pointers can be stored. π¦pANTLR3_COMMON_TOKEN tokenβ a single token, this is the payload for the tree. π
π Detailed Description π
Interface for an ANTLR3 common tree which is what gets passed around by the AST producing parser. no cap, that's the whole job description. π
π Field Documentation π
ANTLR3_BASE_TREE ANTLR3_COMMON_TREE_struct::baseTree
An encapsulated BASE TREE structure (NOT a pointer) that performs a lot of the dirty work of node management. To this we add just a few functions that are specific to the payload. π
You can further abstract common tree so long as you always have a baseTree pointer in the top structure and copy it from the next one down. So, let's say we have a structure JIMS_TREE. It needs an ANTLR3_BASE_TREE that will support all the general tree duplication stuff. It needs a ANTLR3_COMMON_TREE structure embedded or completely provides the equivalent interface. It provides it's own methods and data. To create a new one of these, the function provided to the tree adaptor (see comments there) should allocate the memory for a new JIMS_TREE structure, then call
antlr3InitCommonTree(<addressofembeddedCOMMON_TREE>)
antlr3BaseTreeNew(<addressofBASETREE>)
The interfaces for BASE_TREE and COMMON_TREE will then be initialized. You then call and you can override them or just init JIMS_TREE (note that the base tree in common tree will be ignored) just the top level base tree is used). Codegen will take care of the rest. π€
Referenced by_LT(),addNavigationNode(),antlr3ArboretumNew(),antlr3SetCTAPI(),getMissingSymbol(),LB(),newDownNode(),newFromTree(),newPoolTree(),newUpNode(), andreuse(). π«Ά
ANTLR3_INT32 ANTLR3_COMMON_TREE_struct::childIndex
What index is this particular node in the child list it belongs to? π’
Referenced by antlr3SetCTAPI().
pANTLR3_ARBORETUM ANTLR3_COMMON_TREE_struct::factory
Pointer to the tree factory that manufactured this token. This can be used by duplication methods and so on to manufacture another auto-tracked common tree structure. πβ¨
Referenced byantlr3ArboretumNew(),dupNode(),newPoolTree(), andreuse().
pANTLR3_COMMON_TREE ANTLR3_COMMON_TREE_struct::parent
Points to the node that has this node as a child. If this is NULL, then this is the root node. π±
Referenced by antlr3SetCTAPI().
ANTLR3_MARKER ANTLR3_COMMON_TREE_struct::startIndex
Start token index that encases this tree. π¬
Referenced byantlr3SetCTAPI(), andsetTokenBoundaries().
ANTLR3_MARKER ANTLR3_COMMON_TREE_struct::stopIndex
End token that encases this tree. π¬
Referenced byantlr3SetCTAPI(), andsetTokenBoundaries().
void* ANTLR3_COMMON_TREE_struct::super
Not used by ANTLR, but if a super structure is created above this structure, it can be used to point to the start of the super structure, where additional data and function pointers can be stored. π¦
pANTLR3_COMMON_TOKEN ANTLR3_COMMON_TREE_struct::token
A single token, this is the payload for the tree. π
Referenced byantlr3CommonTreeNewFromToken(),antlr3CommonTreeNodeStreamFree(),antlr3CommonTreeNodeStreamNew(),antlr3CommonTreeNodeStreamNewStream(),antlr3RecognitionExceptionNew(),antlr3SetCTAPI(),getLine(),getType(), andnewFromTree().
π Author π
Generated automatically by Doxygen for ANTLR3C from the source code. π€π
okay that's the whole page bestie, you ATE that reading session, periodt π β¨
Version 3.3.1 β dated Tue Jul 29 2025 β and that's your cute lil sign-off, no notes, iykyk ππ¦πΈ
π¦ where this page comes from
- fedora 43: antlr3-C-devel 1:3.4-3.5.3.14.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms