ANTLR3_INT_TRIE_struct(3)
β¨ ANTLR3_INT_TRIE_struct β the vibe check π
okay bestie, gather round, because today we're talking about ANTLR3_INT_TRIE_struct from the ANTLR3C manual (section 3, the library-functions girlies π«Ά). This is the struct that literally defines an ANTLR3_INT_TRIE, no cap.
πΈ SYNOPSIS πΈ
#include <antlr3collections.h>
π Data Fields π
ANTLR3_BOOLEAN(* add )(struct ANTLR3_INT_TRIE_struct *trie, ANTLR3_INTKEY key, ANTLR3_UINT32 type, ANTLR3_INTKEY intVal, void *data, void(ANTLR3_CDECL *freeptr)(void *))ANTLR3_BOOLEAN allowDupsANTLR3_UINT32 countpANTLR3_INT_TRIE_NODE currentANTLR3_BOOLEAN(* del )(struct ANTLR3_INT_TRIE_struct *trie, ANTLR3_INTKEY key)void(* free )(struct ANTLR3_INT_TRIE_struct *trie)pANTLR3_TRIE_ENTRY(* get )(struct ANTLR3_INT_TRIE_struct *trie, ANTLR3_INTKEY key)pANTLR3_INT_TRIE_NODE root
π Detailed Description π
So the whole plot of this struct is: it defines an ANTLR3_INT_TRIE. That's the main character arc. β¨
For this particular implementation, as you might expect, the key gets turned into a "string" by peeking at bit(key, depth) of the integer key. And the way that using 64 bit keys gives us a depth limit of 64 (or bit 0..63) and potentially a huge trie?? it's giving iconic, honestly. This is the algorithm for a Patricia Trie. Also note that this trie [can] accept multiple entries for the same key, which makes it a kind of elastic bucket patricia trie. obsessed.
If you find this code useful, please feel free to 'steal' it for any purpose as covered by the BSD license under which ANTLR is issued. Like, go off, queen π. You can cut the code, but as the ANTLR library is only about 50K (Windows Vista), you might find it easier to just link the library. Please keep all comments and licenses and so on in any version of this you create of course β respect the ancestors, bestie π.
β Jim Idle.
π¦ Field Documentation π¦
ANTLR3_BOOLEAN(* ANTLR3_INT_TRIE_struct::add) (struct ANTLR3_INT_TRIE_struct *trie, ANTLR3_INTKEY key, ANTLR3_UINT32 type, ANTLR3_INTKEY intVal, void *data, void(ANTLR3_CDECL *freeptr)(void *))
Referenced by antlr3IntTrieNew(), getRuleMemoization(), and memoize().
ANTLR3_BOOLEAN ANTLR3_INT_TRIE_struct::allowDups
Referenced by intTrieAdd().
ANTLR3_UINT32 ANTLR3_INT_TRIE_struct::count
Referenced by antlr3IntTrieNew(), intTrieAdd(), and intTrieGet().
pANTLR3_INT_TRIE_NODE ANTLR3_INT_TRIE_struct::current
(this one's just out here living its best life, no references listed, we respect the mystery π)
ANTLR3_BOOLEAN(* ANTLR3_INT_TRIE_struct::del) (struct ANTLR3_INT_TRIE_struct *trie, ANTLR3_INTKEY key)
Referenced by antlr3IntTrieNew().
void(* ANTLR3_INT_TRIE_struct::free) (struct ANTLR3_INT_TRIE_struct *trie)
Referenced by antlr3IntTrieNew(), freeBR(), and reset().
pANTLR3_TRIE_ENTRY(* ANTLR3_INT_TRIE_struct::get) (struct ANTLR3_INT_TRIE_struct *trie, ANTLR3_INTKEY key)
Referenced by antlr3IntTrieNew(), getRuleMemoization(), and memoize().
pANTLR3_INT_TRIE_NODE ANTLR3_INT_TRIE_struct::root
Referenced by antlr3IntTrieNew(), intTrieAdd(), intTrieDel(), intTrieFree(), and intTrieGet().
π Author π
Generated automatically by Doxygen for ANTLR3C from the source code. (not a human, just a very diligent robot πβ¨)
fr fr, that's the whole page. every field, every reference, nothing skipped. periodt. π
okay bye bestie, this was Version 3.3.1, dated Tue Jul 29 2025 00:00:00, and it's the ANTLR3_INT_TRIE_struct(3) page from the ANTLR3C manual. slay ππ¦π
π¦ 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