src/antlr3bitset.c(3)
π src/antlr3bitset.c π
okay bestie, we're in the ANTLR3C manual and this page is literally all about one file, so let's get into it π
πΈ NAME πΈ
src/antlr3bitset.c β it's giving "the C implementation of ANTLR3 bitsets as adapted from Terence Parr's Java implementation." That's the whole vibe. That's the file. π
β¨ SYNOPSIS β¨
#include <antlr3bitset.h>
π Functions π
here's the whole roster, no cap, every single one:
static void antlr3BitsetAdd (pANTLR3_BITSET bitset, ANTLR3_INT32 bit)static pANTLR3_BITSET antlr3BitsetClone (pANTLR3_BITSET inSet)ANTLR3_API pANTLR3_BITSET antlr3BitsetCopy (pANTLR3_BITSET_LIST blist)static ANTLR3_BOOLEAN antlr3BitsetEquals (pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2)static void antlr3BitsetFree (pANTLR3_BITSET bitset)static ANTLR3_BOOLEAN antlr3BitsetIsNil (pANTLR3_BITSET bitset)ANTLR3_API pANTLR3_BITSET antlr3BitsetList (pANTLR3_HASH_TABLE list)ANTLR3_API pANTLR3_BITSET antlr3BitsetLoad (pANTLR3_BITSET_LIST inBits)β creates a new bitset with at least one 64 bit bset of bits, but as many 64 bit sets as are required. (yes it says "bset" in the original, we stan a typo π)static ANTLR3_BOOLEAN antlr3BitsetMember (pANTLR3_BITSET bitset, ANTLR3_UINT32 bit)ANTLR3_API pANTLR3_BITSET antlr3BitsetNew (ANTLR3_UINT32 numBits)static ANTLR3_UINT32 antlr3BitsetNumBits (pANTLR3_BITSET bitset)ANTLR3_API pANTLR3_BITSET antlr3BitsetOf (ANTLR3_INT32 bit,...)β creates a new bitset with at least one element, but as many elements are required.static pANTLR3_BITSET antlr3BitsetOR (pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2)static void antlr3BitsetORInPlace (pANTLR3_BITSET bitset, pANTLR3_BITSET bitset2)static void antlr3BitsetRemove (pANTLR3_BITSET bitset, ANTLR3_UINT32 bit)ANTLR3_API void antlr3BitsetSetAPI (pANTLR3_BITSET bitset)static ANTLR3_UINT32 antlr3BitsetSize (pANTLR3_BITSET bitset)static pANTLR3_INT32 antlr3BitsetToIntList (pANTLR3_BITSET bitset)β produce an integer list of all the bits that are turned on in this bitset.static ANTLR3_UINT64 bitMask (ANTLR3_UINT32 bitNumber)static void grow (pANTLR3_BITSET bitset, ANTLR3_INT32 newSize)static void growToInclude (pANTLR3_BITSET bitset, ANTLR3_INT32 bit)static ANTLR3_UINT32 numWordsToHold (ANTLR3_UINT32 bit)static ANTLR3_UINT32 wordNumber (ANTLR3_UINT32 bit)
π Detailed Description π
Contains the C implementation of ANTLR3 bitsets as adapted from Terence Parr's Java implementation. iconic behavior, honestly π¦
π Function Documentation π
π« void antlr3BitsetAdd (pANTLR3_BITSET bitset, ANTLR3_INT32 bit) [static]
References: bitMask, ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, growToInclude(), ANTLR3_BITSET_LIST_struct::length, and wordNumber().
Referenced by: antlr3BitsetOf(), and antlr3BitsetSetAPI().
π« pANTLR3_BITSET antlr3BitsetClone (pANTLR3_BITSET inSet) [static]
References: ANTLR3_BITSET_BITS, antlr3BitsetNew(), ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, and ANTLR3_BITSET_LIST_struct::length.
Referenced by: antlr3BitsetOR(), and antlr3BitsetSetAPI().
π« ANTLR3_API pANTLR3_BITSET antlr3BitsetCopy (pANTLR3_BITSET_LIST blist)
References: ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, and ANTLR3_BITSET_LIST_struct::length.
π« ANTLR3_BOOLEAN antlr3BitsetEquals (pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2) [static]
References: ANTLR3_FALSE, ANTLR3_TRUE, ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, and ANTLR3_BITSET_LIST_struct::length.
Referenced by: antlr3BitsetSetAPI().
π« void antlr3BitsetFree (pANTLR3_BITSET bitset) [static]
References: ANTLR3_BITSET_LIST_struct::bits, and ANTLR3_BITSET_struct::blist.
Referenced by: antlr3BitsetSetAPI().
π« ANTLR3_BOOLEAN antlr3BitsetIsNil (pANTLR3_BITSET bitset) [static]
References: ANTLR3_FALSE, ANTLR3_TRUE, ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, and ANTLR3_BITSET_LIST_struct::length.
Referenced by: antlr3BitsetSetAPI().
π« ANTLR3_API pANTLR3_BITSET antlr3BitsetList (pANTLR3_HASH_TABLE list)
References: ANTLR3_BITSET_struct::add, ANTLR3_SUCCESS, antlr3BitsetNew(), antlr3EnumNew(), ANTLR3_HASH_ENUM_struct::free, and ANTLR3_HASH_ENUM_struct::next.
Referenced by: getTokensList().
π« ANTLR3_API pANTLR3_BITSET antlr3BitsetLoad (pANTLR3_BITSET_LIST inBits)
Creates a new bitset with at least one 64 bit bset of bits, but as many 64 bit sets as are required.
Parameters
bsetβ a variable number of bits to add to the set, ending in-1(impossible bit).
Returns
- A new bit set with all of the specified bitmaps in it and the API initialized.
Call as:
pANTLR3_BITSET = antlrBitsetLoad(bset, bset11, ..., -1);pANTLR3_BITSET = antlrBitsetOf(-1);Create empty bitset
Remarks
Stdargs function β must supply -1 as last paremeter, which is NOT added to the set. (yes, "paremeter" π the original said it, not me)
References: antlr3BitsetNew(), ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, ANTLR3_BITSET_struct::grow, and ANTLR3_BITSET_LIST_struct::length.
Referenced by: combineFollows(), displayRecognitionError(), mismatchIsMissingToken(), and recoverFromMismatchedElement().
π« ANTLR3_BOOLEAN antlr3BitsetMember (pANTLR3_BITSET bitset, ANTLR3_UINT32 bit) [static]
References: ANTLR3_FALSE, ANTLR3_TRUE, bitMask, ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, ANTLR3_BITSET_LIST_struct::length, and wordNumber().
Referenced by: antlr3BitsetSetAPI().
π« ANTLR3_API pANTLR3_BITSET antlr3BitsetNew (ANTLR3_UINT32 numBits)
References: ANTLR3_BITSET_BITS, ANTLR3_BITSET_LOG_BITS, antlr3BitsetSetAPI(), ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, and ANTLR3_BITSET_LIST_struct::length.
Referenced by: addEdge(), antlr3BitsetClone(), antlr3BitsetList(), antlr3BitsetLoad(), antlr3BitsetOf(), combineFollows(), and sortToArray().
π« ANTLR3_UINT32 antlr3BitsetNumBits (pANTLR3_BITSET bitset) [static]
References: ANTLR3_BITSET_LOG_BITS, ANTLR3_BITSET_struct::blist, and ANTLR3_BITSET_LIST_struct::length.
Referenced by: antlr3BitsetSetAPI().
π« ANTLR3_API pANTLR3_BITSET antlr3BitsetOf (ANTLR3_INT32 bit, ...)
Creates a new bitset with at least one element, but as many elements are required.
Parameters
bitβ a variable number of bits to add to the set, ending in-1(impossible bit).
Returns
- A new bit set with all of the specified elements added into it.
Call as:
pANTLR3_BITSET = antlrBitsetOf(n, n1, n2, -1);pANTLR3_BITSET = antlrBitsetOf(-1);Create empty bitset
Remarks
Stdargs function β must supply -1 as last paremeter, which is NOT added to the set.
References: antlr3BitsetAdd(), and antlr3BitsetNew().
Referenced by: getTokensType().
π« pANTLR3_BITSET antlr3BitsetOR (pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2) [static]
References: antlr3BitsetClone(), and antlr3BitsetORInPlace().
Referenced by: antlr3BitsetSetAPI().
π« void antlr3BitsetORInPlace (pANTLR3_BITSET bitset, pANTLR3_BITSET bitset2) [static]
References: ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, growToInclude(), and ANTLR3_BITSET_LIST_struct::length.
Referenced by: antlr3BitsetOR(), and antlr3BitsetSetAPI().
π« void antlr3BitsetRemove (pANTLR3_BITSET bitset, ANTLR3_UINT32 bit) [static]
References: bitMask, ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, and wordNumber().
Referenced by: antlr3BitsetSetAPI().
π« ANTLR3_API void antlr3BitsetSetAPI (pANTLR3_BITSET bitset)
References: ANTLR3_BITSET_struct::add, antlr3BitsetAdd(), antlr3BitsetClone(), antlr3BitsetEquals(), antlr3BitsetFree(), antlr3BitsetIsNil(), antlr3BitsetMember(), antlr3BitsetNumBits(), antlr3BitsetOR(), antlr3BitsetORInPlace(), antlr3BitsetRemove(), antlr3BitsetSize(), antlr3BitsetToIntList(), ANTLR3_BITSET_struct::bor, ANTLR3_BITSET_struct::borInPlace, ANTLR3_BITSET_struct::clone, ANTLR3_BITSET_struct::equals, ANTLR3_BITSET_struct::free, ANTLR3_BITSET_struct::grow, grow(), ANTLR3_BITSET_struct::isMember, ANTLR3_BITSET_struct::isNilNode, ANTLR3_BITSET_struct::numBits, ANTLR3_BITSET_struct::remove, ANTLR3_BITSET_struct::size, and ANTLR3_BITSET_struct::toIntList.
Referenced by: antlr3BitsetNew().
π« ANTLR3_UINT32 antlr3BitsetSize (pANTLR3_BITSET bitset) [static]
References: ANTLR3_BITSET_BITS, ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, and ANTLR3_BITSET_LIST_struct::length.
Referenced by: antlr3BitsetSetAPI().
π« pANTLR3_INT32 antlr3BitsetToIntList (pANTLR3_BITSET bitset) [static]
Produce an integer list of all the bits that are turned on in this bitset. Used for error processing in the main as the bitset reresents a number of integer tokens which we use for follow sets and so on. (again, "reresents" is straight from the source, we love her πΈ)
The first entry is the number of elements following in the list.
References: ANTLR3_TRUE, ANTLR3_BITSET_struct::isMember, ANTLR3_BITSET_struct::numBits, and ANTLR3_BITSET_struct::size.
Referenced by: antlr3BitsetSetAPI().
π« ANTLR3_UINT64 bitMask (ANTLR3_UINT32 bitNumber) [static]
References: ANTLR3_BITSET_MOD_MASK.
π« void grow (pANTLR3_BITSET bitset, ANTLR3_INT32 newSize) [static]
References: ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, and ANTLR3_BITSET_LIST_struct::length.
Referenced by: antlr3BitsetSetAPI().
π« void growToInclude (pANTLR3_BITSET bitset, ANTLR3_INT32 bit) [static]
References: ANTLR3_BITSET_struct::blist, ANTLR3_BITSET_struct::grow, ANTLR3_BITSET_LIST_struct::length, and numWordsToHold().
Referenced by: antlr3BitsetAdd(), and antlr3BitsetORInPlace().
π« ANTLR3_UINT32 numWordsToHold (ANTLR3_UINT32 bit) [static]
References: ANTLR3_BITSET_LOG_BITS.
Referenced by: growToInclude().
π« ANTLR3_UINT32 wordNumber (ANTLR3_UINT32 bit) [static]
References: ANTLR3_BITSET_LOG_BITS.
Referenced by: antlr3BitsetAdd(), antlr3BitsetMember(), and antlr3BitsetRemove().
π Author π
Generated automatically by Doxygen for ANTLR3C from the source code. no human wrote this, the machine did, and honestly? slay π€π
and that's the whole page bestie, we ate πβ¨ This was Version 3.3.1, dated Tue Jul 29 2025, pulled straight out of src/antlr3bitset.c(3) β go forth and bitset, you've got this fr fr ππ¦
π¦ 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