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.

Hierarchy

  • BitSet

Index

Constructors

constructor

  • new BitSet(nbits?: number): BitSet
  • Construct a bitset given the size

    Parameters

    • Optional nbits: number

      The size of the bitset in bits

    Returns BitSet

Properties

_bits

_bits: number[]

The actual data bits

Methods

add

  • add(el: number): void
  • or this element into this set (grow as necessary to accommodate)

    Parameters

    • el: number

    Returns void

clone

  • clone(): any
  • Returns any

equals

  • equals(other: any): boolean
  • Parameters

    • other: any

    Returns boolean

getHashCode

  • getHashCode(): number
  • Returns number

growToInclude

  • growToInclude(bit: number): void
  • Grows the set to a larger number of bits.

    Parameters

    • bit: number

      element that must fit in set

    Returns void

isNil

  • isNil(): boolean
  • Returns boolean

lengthInLongWords

  • lengthInLongWords(): number
  • return how much space is being used by the bits array not how many actually have member bits on.

    Returns number

member

  • member(el: number): boolean
  • Parameters

    • el: number

    Returns boolean

numBits

  • numBits(): number
  • Returns number

or

  • return this | a in a new set

    Parameters

    Returns BitSet

orInPlace

  • Parameters

    Returns void

remove

  • remove(el: number): void
  • Parameters

    • el: number

    Returns void

size

  • size(): number
  • Returns number

toArray

  • toArray(): number[]
  • Is this contained within a?

    Returns number[]

toString

  • toString(tokenNames?: string[]): string
  • Parameters

    • Default value tokenNames: string[] = null

    Returns string

Static create

  • create(bits: number[]): BitSet
  • Construction from a static array of longs

    Parameters

    • bits: number[]

    Returns BitSet

Static of

  • Parameters

    • el: number

    Returns BitSet

Static of2

  • of2(a: number, b: number): BitSet
  • Parameters

    • a: number
    • b: number

    Returns BitSet

Static of3

  • of3(a: number, b: number, c: number): BitSet
  • Parameters

    • a: number
    • b: number
    • c: number

    Returns BitSet

Static of4

  • of4(a: number, b?: number, c?: number, d?: number): BitSet
  • Parameters

    • a: number
    • Optional b: number
    • Optional c: number
    • Optional d: number

    Returns BitSet

Generated using TypeDoc