C# Class Antlr.Runtime.BitSet

A stripped-down version of org.antlr.misc.BitSet that is just good enough to handle runtime requirements such as FOLLOW sets for automatic error recovery.
Inheritance: ICloneable
Datei anzeigen Open project: antlr/antlrcs Class Usage Examples

Public Methods

Method Description
Add ( int el ) : void

or this element into this set (grow as necessary to accommodate)

BitSet ( ) : System.Collections.Generic

Construct a bitset of size one word (64 bits)

BitSet ( IEnumerable items ) : System.Collections.Generic

Construction from a list of integers

BitSet ( int nbits ) : System.Collections.Generic

Construct a bitset given the size

Clone ( ) : object
Equals ( object other ) : bool
GetHashCode ( ) : int
GrowToInclude ( int bit ) : void

Grows the set to a larger number of bits.

IsNil ( ) : bool
LengthInLongWords ( ) : int

return how much space is being used by the bits array not how many actually have member bits on.

Member ( int el ) : bool
NumBits ( ) : int
Of ( int el ) : BitSet
Of ( int a, int b ) : BitSet
Of ( int a, int b, int c ) : BitSet
Of ( int a, int b, int c, int d ) : BitSet
Or ( BitSet a ) : BitSet

return this | a in a new set

OrInPlace ( BitSet a ) : void
Remove ( int el ) : void
Size ( ) : int
ToArray ( ) : int[]
ToString ( ) : string
ToString ( string tokenNames ) : string

Private Methods

Method Description
BitMask ( int bitNumber ) : ulong
BitSet ( ulong bits ) : System.Collections.Generic
NumWordsToHold ( int el ) : int
SetSize ( int nwords ) : void

Sets the size of a set.

WordNumber ( int bit ) : int

Method Details

Add() public method

or this element into this set (grow as necessary to accommodate)
public Add ( int el ) : void
el int
return void

BitSet() public method

Construct a bitset of size one word (64 bits)
public BitSet ( ) : System.Collections.Generic
return System.Collections.Generic

BitSet() public method

Construction from a list of integers
public BitSet ( IEnumerable items ) : System.Collections.Generic
items IEnumerable
return System.Collections.Generic

BitSet() public method

Construct a bitset given the size
public BitSet ( int nbits ) : System.Collections.Generic
nbits int The size of the bitset in bits
return System.Collections.Generic

Clone() public method

public Clone ( ) : object
return object

Equals() public method

public Equals ( object other ) : bool
other object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

GrowToInclude() public method

Grows the set to a larger number of bits.
public GrowToInclude ( int bit ) : void
bit int element that must fit in set
return void

IsNil() public method

public IsNil ( ) : bool
return bool

LengthInLongWords() public method

return how much space is being used by the bits array not how many actually have member bits on.
public LengthInLongWords ( ) : int
return int

Member() public method

public Member ( int el ) : bool
el int
return bool

NumBits() public method

public NumBits ( ) : int
return int

Of() public static method

public static Of ( int el ) : BitSet
el int
return BitSet

Of() public static method

public static Of ( int a, int b ) : BitSet
a int
b int
return BitSet

Of() public static method

public static Of ( int a, int b, int c ) : BitSet
a int
b int
c int
return BitSet

Of() public static method

public static Of ( int a, int b, int c, int d ) : BitSet
a int
b int
c int
d int
return BitSet

Or() public method

return this | a in a new set
public Or ( BitSet a ) : BitSet
a BitSet
return BitSet

OrInPlace() public method

public OrInPlace ( BitSet a ) : void
a BitSet
return void

Remove() public method

public Remove ( int el ) : void
el int
return void

Size() public method

public Size ( ) : int
return int

ToArray() public method

public ToArray ( ) : int[]
return int[]

ToString() public method

public ToString ( ) : string
return string

ToString() public method

public ToString ( string tokenNames ) : string
tokenNames string
return string