antlr3bitset.h File Reference


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.

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

Include dependency graph for antlr3bitset.h:

This graph shows which files directly or indirectly include this file:


Data Structures

struct  ANTLR3_BITSET_LIST_struct
struct  ANTLR3_BITSET_struct

Defines

#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

Define 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


Generated on Mon Nov 29 17:22:57 2010 for ANTLR3C by  doxygen 1.5.5