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

NAMEANTLR3_ARBORETUM_struct − ANTLR3 Tree factory interface to create lots of trees efficiently rather than creating and freeing lots of little bits of memory​.

SYNOPSIS
#include <antlr3commontree​.h>

Data Fieldsvoid(* close )(struct ANTLR3_ARBORETUM_struct *factory)
Pointer to a function the destroys the factory​.
pANTLR3_BASE_TREE(* newFromToken )(struct ANTLR3_ARBORETUM_struct *factory, pANTLR3_COMMON_TOKEN token)
pANTLR3_BASE_TREE(* newFromTree )(struct ANTLR3_ARBORETUM_struct *factory, pANTLR3_COMMON_TREE tree)
pANTLR3_BASE_TREE(* newTree )(struct ANTLR3_ARBORETUM_struct *factory)
Pointer to a function that returns a new tree​.
ANTLR3_UINT32 nextTree
The next token to throw out from the pool, will cause a new pool allocation if this exceeds the available tokenCount​.
pANTLR3_STACK nilStack
A resuse stack for reclaiming Nil nodes that were used in rewrites and are now dead​.
pANTLR3_COMMON_TREE * pools
Pointers to the array of tokens that this factory has produced so far​.
ANTLR3_INT32 thisPool
Current pool tokens we are allocating from​.
ANTLR3_COMMON_TREE unTruc
Trick to initialize tokens and their API quickly, we set up this token when the factory is created, then just copy the memory it uses into the new token​.
pANTLR3_VECTOR_FACTORY vFactory
Pointer to a vector factory that is used to create child list vectors for any child nodes that need them​.

Detailed DescriptionANTLR3 Tree factory interface to create lots of trees efficiently rather than creating and freeing lots of little bits of memory​.

Field Documentation

void(* ANTLR3_ARBORETUM_struct::close) (struct ANTLR3_ARBORETUM_struct *factory)Pointer to a function the destroys the factory​. Referenced by antlr3ArboretumNew(), and ctaFree()​.

pANTLR3_BASE_TREE(* ANTLR3_ARBORETUM_struct::newFromToken) (struct ANTLR3_ARBORETUM_struct *factory, pANTLR3_COMMON_TOKEN token)Referenced by antlr3ArboretumNew()​.

pANTLR3_BASE_TREE(* ANTLR3_ARBORETUM_struct::newFromTree) (struct ANTLR3_ARBORETUM_struct *factory, pANTLR3_COMMON_TREE tree)Referenced by antlr3ArboretumNew(), and dupNode()​.

pANTLR3_BASE_TREE(* ANTLR3_ARBORETUM_struct::newTree) (struct ANTLR3_ARBORETUM_struct *factory)Pointer to a function that returns a new tree​. Referenced by antlr3ArboretumNew(), newFromToken(), and newFromTree()​.

ANTLR3_UINT32 ANTLR3_ARBORETUM_struct::nextTreeThe next token to throw out from the pool, will cause a new pool allocation if this exceeds the available tokenCount​. Referenced by newPool(), and newPoolTree()​.

pANTLR3_STACK ANTLR3_ARBORETUM_struct::nilStackA resuse stack for reclaiming Nil nodes that were used in rewrites and are now dead​. The nilNode() method will eat one of these before creating a new node​. Referenced by antlr3ArboretumNew(), factoryClose(), newPoolTree(), and reuse()​.

pANTLR3_COMMON_TREE* ANTLR3_ARBORETUM_struct::poolsPointers to the array of tokens that this factory has produced so far​. Referenced by antlr3ArboretumNew(), factoryClose(), newPool(), and newPoolTree()​.

ANTLR3_INT32 ANTLR3_ARBORETUM_struct::thisPoolCurrent pool tokens we are allocating from​. Referenced by antlr3ArboretumNew(), factoryClose(), newPool(), and newPoolTree()​.

ANTLR3_COMMON_TREE ANTLR3_ARBORETUM_struct::unTrucTrick to initialize tokens and their API quickly, we set up this token when the factory is created, then just copy the memory it uses into the new token​. Referenced by antlr3ArboretumNew(), and newPoolTree()​.

pANTLR3_VECTOR_FACTORY ANTLR3_ARBORETUM_struct::vFactoryPointer to a vector factory that is used to create child list vectors for any child nodes that need them​. This means that we auto track the vectors and auto free them when we close the factory​. It also means that all rewriting trees can use the same tree factory and the same vector factory and we do not dup any nodes unless we must do so explicitly because of context such as an empty rewrite stream and ->IMAGINARY[ID] so on​. This makes memory tracking much simpler and tempts no errors​. Referenced by antlr3ArboretumNew(), and factoryClose()​.

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