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

NAMEANTLR3_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 FieldsANTLR3_BASE_TREE 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​.
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 DescriptionInterface for an ANTLR3 common tree which is what gets passed around by the AST producing parser​.

Field Documentation

ANTLR3_BASE_TREE ANTLR3_COMMON_TREE_struct::baseTreeAn 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, lets 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(), and reuse()​.

ANTLR3_INT32 ANTLR3_COMMON_TREE_struct::childIndexWhat index is this particular node in the child list it belongs to? Referenced by antlr3SetCTAPI()​.

pANTLR3_ARBORETUM ANTLR3_COMMON_TREE_struct::factoryPointer 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 by antlr3ArboretumNew(), dupNode(), newPoolTree(), and reuse()​.

pANTLR3_COMMON_TREE ANTLR3_COMMON_TREE_struct::parentPoints 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::startIndexStart token index that encases this tree​. Referenced by antlr3SetCTAPI(), and setTokenBoundaries()​.

ANTLR3_MARKER ANTLR3_COMMON_TREE_struct::stopIndexEnd token that encases this tree​. Referenced by antlr3SetCTAPI(), and setTokenBoundaries()​.

void* ANTLR3_COMMON_TREE_struct::superNot 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::tokenA single token, this is the payload for the tree​. Referenced by antlr3CommonTreeNewFromToken(), antlr3CommonTreeNodeStreamFree(), antlr3CommonTreeNodeStreamNew(), antlr3CommonTreeNodeStreamNewStream(), antlr3RecognitionExceptionNew(), antlr3SetCTAPI(), getLine(), getType(), and newFromTree()​.

AuthorGenerated automatically by Doxygen for ANTLR3C from the source code​.
0
Johanes Gumabo
Data Size   :   15,698 byte
man-antlr3-factory.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 236,421
Visitor ID   :     :  
Visitor IP   :   3.137.221.114   :  
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.