src/antlr3bitset.c - Online Linux Manual PageSection : 3
Updated : Tue Jan 26 2021
Source : Version 3.3.1
Note : ANTLR3C
NAMEsrc/antlr3bitset.c − Contains the C implementation of ANTLR3 bitsets as adapted from Terence Parr's Java implementation.
SYNOPSIS
#include <antlr3bitset.h>
Functionsstatic 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. 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 DescriptionContains the C implementation of ANTLR3 bitsets as adapted from Terence Parr's Java implementation.
Function Documentation
static 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().
static pANTLR3_BITSET antlr3BitsetClone (pANTLR3_BITSET inSet) [static]References ANTLR3_BITSET_BITS, ANTLR3_MEMCPY, 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_FREE, ANTLR3_MALLOC, ANTLR3_MEMCPY, ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, and ANTLR3_BITSET_LIST_struct::length.
static 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().
static void antlr3BitsetFree (pANTLR3_BITSET bitset) [static]References ANTLR3_FREE, ANTLR3_BITSET_LIST_struct::bits, and ANTLR3_BITSET_struct::blist. Referenced by antlr3BitsetSetAPI().
static 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. 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().
static 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, ANTLR3_FREE, ANTLR3_MALLOC, 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().
static 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().
static pANTLR3_BITSET antlr3BitsetOR (pANTLR3_BITSET bitset1, pANTLR3_BITSET bitset2) [static]References antlr3BitsetClone(), and antlr3BitsetORInPlace(). Referenced by antlr3BitsetSetAPI().
static 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().
static 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, grow(), ANTLR3_BITSET_struct::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().
static 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().
static 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. The first entry is the number of elements following in the list. References ANTLR3_MALLOC, ANTLR3_TRUE, ANTLR3_BITSET_struct::isMember, ANTLR3_BITSET_struct::numBits, and ANTLR3_BITSET_struct::size. Referenced by antlr3BitsetSetAPI().
static ANTLR3_UINT64 bitMask (ANTLR3_UINT32 bitNumber) [static]References ANTLR3_BITSET_MOD_MASK. Referenced by antlr3BitsetAdd(), antlr3BitsetMember(), and antlr3BitsetRemove().
static void grow (pANTLR3_BITSET bitset, ANTLR3_INT32 newSize) [static]References ANTLR3_CALLOC, ANTLR3_FREE, ANTLR3_MEMCPY, ANTLR3_BITSET_LIST_struct::bits, ANTLR3_BITSET_struct::blist, and ANTLR3_BITSET_LIST_struct::length. Referenced by antlr3BitsetSetAPI().
static 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().
static ANTLR3_UINT32 numWordsToHold (ANTLR3_UINT32 bit) [static]References ANTLR3_BITSET_LOG_BITS. Referenced by growToInclude().
static ANTLR3_UINT32 wordNumber (ANTLR3_UINT32 bit) [static]References ANTLR3_BITSET_LOG_BITS. Referenced by antlr3BitsetAdd(), antlr3BitsetMember(), and antlr3BitsetRemove().
AuthorGenerated automatically by Doxygen for ANTLR3C from the source code. 0
Johanes Gumabo
Data Size : 50,742 byte
man-antlr3-numWordsToHold.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 193,850
Visitor ID : :
Visitor IP : 3.137.174.253 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.