src/antlr3bitset.c(3)

πŸ“¦ version 3.4, in fedora 43

πŸ’– 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