ANTLR3_VECTOR_struct(3)
π¦ ANTLR3_VECTOR_struct π¦
okay so bestie, welcome to the glow-up doc for ANTLR3_VECTOR_struct π this is a page straight out of the ANTLR3C manual and we're gonna read it together, no skimming, no skipping, fr fr.
β¨ NAME β¨
ANTLR3_VECTOR_struct β that's her, that's the whole name, periodt. π
πΈ SYNOPSIS πΈ
#include <antlr3collections.h>
π Public Member Functions
void (ANTLR3_CDECL *free)(struct ANTLR3_VECTOR_struct *vector)β the free function pointer, she's right there in the header, living her best life.
π Data Fields
ANTLR3_UINT32(* add )(struct ANTLR3_VECTOR_struct *vector, void *element, void(ANTLR3_CDECL *freeptr)(void *))β the add function pointer, signature only, no blurb bestie.void(* clear )(struct ANTLR3_VECTOR_struct *vector)β the clear function pointer, again just the signature.ANTLR3_UINT32 countβ Number of entries currently in the list;. (yes the semicolon is canon, I don't make the rules π«Ά)void(* del )(struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry)β the del function pointer, signature only.pANTLR3_VECTOR_ELEMENT elementsβ Array of pointers to vector elements.ANTLR3_UINT32 elementsSizeβ Total number of entries inelementsat any point in time.ANTLR3_BOOLEAN factoryMadeβ Indicates if the structure was made by a factory, in which case only the factory can free the memory for the actual vector, though the vector free function is called and will recurse through its entries calling any free pointers for each entry.void *(* get )(struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry)β the get function pointer, signature only.ANTLR3_VECTOR_ELEMENT internal [ANTLR3_VECTOR_INTERNAL_SIZE]β Many times, a vector holds just a few nodes in an AST and it is too much overhead to malloc the space forelementsso at the expense of a few bytes of memory, we hold the first few elements internally.void *(* remove )(struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry)β the remove function pointer, signature only.ANTLR3_UINT32(* set )(struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry, void *element, void(ANTLR3_CDECL *freeptr)(void *), ANTLR3_BOOLEAN freeExisting)β the set function pointer, signature only.ANTLR3_UINT32(* size )(struct ANTLR3_VECTOR_struct *vector)β the size function pointer, signature only.ANTLR3_BOOLEAN(* swap )(struct ANTLR3_VECTOR_struct *, ANTLR3_UINT32 entry1, ANTLR3_UINT32 entry2)β the swap function pointer, signature only. (yes, the first param has no name, that's just how she is π)
π MEMBER FUNCTION DOCUMENTATION π
ANTLR3_VECTOR_struct::void (ANTLR3_CDECL * free)
References ANTLR3_CDECL. that's it, that's the whole tea. π
π§ FIELD DOCUMENTATION π§
ANTLR3_UINT32(* ANTLR3_VECTOR_struct::add) (struct ANTLR3_VECTOR_struct *vector, void *element, void(ANTLR3_CDECL *freeptr)(void *))
Referenced by add(), addChild(), addNavigationNode(), antlr38BitMark(), antlr3SetVectorApi(), antlr3StackPush(), fillBuffer(), fillBuffer(), freeNodeRS(), freeRS(), and replaceChildren().
void(* ANTLR3_VECTOR_struct::clear) (struct ANTLR3_VECTOR_struct *vector)
Referenced by antlr3InputReset(), antlr3SetVectorApi(), freeNodeRS(), freeRS(), reset(), returnVector(), and reuse().
ANTLR3_UINT32 ANTLR3_VECTOR_struct::count
Number of entries currently in the list;.
Referenced by _LT(), add(), antlr38BitMark(), antlr3RewriteRuleElementStreamNewAE(), antlr3SetVectorApi(), antlr3StackPop(), antlr3StackSize(), antlr3VectorAdd(), antlr3VectorClear(), antlr3VectorDel(), antlr3VectorFree(), antlr3VectorSet(), antlr3VectorSize(), antrl3VectorRemove(), consume(), fillBuffer(), freeNodeRS(), size(), size(), and sortVector().
void(* ANTLR3_VECTOR_struct::del) (struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry)
Referenced by antlr3SetVectorApi(), antlr3StackPop(), and destroy().
pANTLR3_VECTOR_ELEMENT ANTLR3_VECTOR_struct::elements
Array of pointers to vector elements.
Referenced by antlr3SetVectorApi(), antlr3VectorAdd(), antlr3VectorClear(), antlr3VectorDel(), antlr3VectorFree(), antlr3VectorGet(), antlr3VectorResize(), antlr3VectorSet(), antlr3VectorSwap(), antrl3VectorRemove(), closeVectorFactory(), destroy(), freeNodeRS(), LB(), newVector(), replaceChildren(), skipOffTokenChannels(), skipOffTokenChannelsReverse(), and tokLT().
ANTLR3_UINT32 ANTLR3_VECTOR_struct::elementsSize
Total number of entries in elements at any point in time.
Referenced by antlr3SetVectorApi(), antlr3VectorAdd(), antlr3VectorFree(), antlr3VectorResize(), antlr3VectorSet(), antlr3VectorSwap(), and closeVectorFactory().
ANTLR3_BOOLEAN ANTLR3_VECTOR_struct::factoryMade
Indicates if the structure was made by a factory, in which case only the factory can free the memory for the actual vector, though the vector free function is called and will recurse through its entries calling any free pointers for each entry.
Referenced by antlr3RewriteRuleElementStreamNewAEV(), antlr3SetVectorApi(), antlr3VectorFactoryNew(), antlr3VectorFree(), closeVectorFactory(), freeNodeRS(), freeRS(), and newVector().
void *(* ANTLR3_VECTOR_struct::get) (struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry)
Referenced by _LT(), _next(), addChild(), antlr38BitMark(), antlr38BitRewind(), antlr3SetVectorApi(), antlr3StackGet(), antlr3StackPop(), dupTree(), get(), get(), getChild(), getFirstChildWithType(), LB(), replaceChildren(), and toStringTree().
ANTLR3_VECTOR_ELEMENT ANTLR3_VECTOR_struct::internal[ANTLR3_VECTOR_INTERNAL_SIZE]
Many times, a vector holds just a few nodes in an AST and it is too much overhead to malloc the space for elements so at the expense of a few bytes of memory, we hold the first few elements internally. It means we must copy them when we grow beyond this initial size, but that is less overhead than the malloc/free callas we would otherwise require.
Referenced by antlr3SetVectorApi(), antlr3VectorResize(), and newVector().
void *(* ANTLR3_VECTOR_struct::remove) (struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry)
Referenced by antlr3RewriteRuleElementStreamNewAE(), antlr3SetVectorApi(), deleteChild(), and replaceChildren().
ANTLR3_UINT32(* ANTLR3_VECTOR_struct::set) (struct ANTLR3_VECTOR_struct *vector, ANTLR3_UINT32 entry, void *element, void(ANTLR3_CDECL *freeptr)(void *), ANTLR3_BOOLEAN freeExisting)
Referenced by antlr3SetVectorApi(), newRaw8(), newRawUTF16(), replaceChildren(), and setChild().
ANTLR3_UINT32(* ANTLR3_VECTOR_struct::size) (struct ANTLR3_VECTOR_struct *vector)
Referenced by addChild(), antlr3SetVectorApi(), dupTree(), getChild(), getChildCount(), getFirstChildWithType(), hasNext(), replaceChildren(), size(), and toStringTree().
ANTLR3_BOOLEAN(* ANTLR3_VECTOR_struct::swap) (struct ANTLR3_VECTOR_struct *, ANTLR3_UINT32 entry1, ANTLR3_UINT32 entry2)
Referenced by antlr3SetVectorApi(), and sortVector().
π AUTHOR π
Generated automatically by Doxygen for ANTLR3C from the source code. π€β¨
and that's the whole page bestie, we ate and left no crumbs π this was the ANTLR3C manual, Version 3.3.1, dated Tue Jul 29 2025 00:00:00 β love that for us, mwah π«Άππ
π¦ 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