ANTLR3_INT_TRIE_struct Struct Reference

#include <antlr3collections.h>

Collaboration diagram for ANTLR3_INT_TRIE_struct:

Collaboration graph
[legend]

Detailed Description

Structure that defines an ANTLR3_INT_TRIE.

For this particular implementation, as you might expect, the key is turned into a "string" by looking at bit(key, depth) of the integer key. Using 64 bit keys gives us a depth limit of 64 (or bit 0..63) and potentially a huge trie. This is the algorithm for a Patricia Trie. Note also that this trie [can] accept multiple entries for the same key and is therefore a kind of elastic bucket patricia trie.

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. 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.

Jim Idle.

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 allowDups
ANTLR3_UINT32 count
pANTLR3_INT_TRIE_NODE current
ANTLR3_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


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 intTrieAdd().

Referenced by antlr3IntTrieNew().

Referenced by antlr3IntTrieNew(), freeBR(), and reset().


The documentation for this struct was generated from the following file:

Generated on Mon Nov 29 17:24:05 2010 for ANTLR3C by  doxygen 1.5.5