Sponsor:

Your company here, and a link to your site. Click to find out more.

antlr3bitset.h - Man Page

Defines the basic structures of an ANTLR3 bitset.

Synopsis

#include <antlr3defs.h>
#include <antlr3collections.h>

Data Structures

struct ANTLR3_BITSET_LIST_struct
struct ANTLR3_BITSET_struct

Macros

#define ANTLR3_BITSET_BITS   64
How many bits in the elements.
#define ANTLR3_BITSET_LOG_BITS   6
log2 of ANTLR3_BITSET_BITS 2^ANTLR3_BITSET_LOG_BITS = ANTLR3_BITSET_BITS
#define ANTLR3_BITSET_MOD_MASK   ANTLR3_BITSET_BITS - 1
We will often need to do a mod operator (i mod nbits).
#define ANTLR3_BITSET_NIBBLE   4
How many bits in a nible of bits.

Typedefs

typedef struct ANTLR3_BITSET_struct ANTLR3_BITSET
typedef struct ANTLR3_BITSET_LIST_struct ANTLR3_BITSET_LIST

Detailed Description

Defines the basic structures of an ANTLR3 bitset.

this is a C version of the cut down Bitset class provided with the java version of antlr 3.

Macro Definition Documentation

#define ANTLR3_BITSET_BITS   64

How many bits in the elements.

Referenced by antlr3BitsetClone(), antlr3BitsetNew(), and antlr3BitsetSize().

#define ANTLR3_BITSET_LOG_BITS   6

log2 of ANTLR3_BITSET_BITS 2^ANTLR3_BITSET_LOG_BITS = ANTLR3_BITSET_BITS

Referenced by antlr3BitsetNew(), antlr3BitsetNumBits(), numWordsToHold(), and wordNumber().

#define ANTLR3_BITSET_MOD_MASK   ANTLR3_BITSET_BITS - 1

We will often need to do a mod operator (i mod nbits). For powers of two, this mod operation is the same as:

  • (i & (nbits-1)).

Since mod is relatively slow, we use an easily precomputed mod mask to do the mod instead.

Referenced by bitMask().

#define ANTLR3_BITSET_NIBBLE   4

How many bits in a nible of bits.

Typedef Documentation

typedef struct ANTLR3_BITSET_struct ANTLR3_BITSET

typedef struct ANTLR3_BITSET_LIST_struct ANTLR3_BITSET_LIST

Author

Generated automatically by Doxygen for ANTLR3C from the source code.

Referenced By

The man pages ANTLR3_BITSET_BITS(3), ANTLR3_BITSET_LIST(3), ANTLR3_BITSET_LOG_BITS(3), ANTLR3_BITSET_MOD_MASK(3) and ANTLR3_BITSET_NIBBLE(3) are aliases of antlr3bitset.h(3).

Tue Feb 27 2024 00:00:00 Version 3.3.1 ANTLR3C