Struct cfg::symbol::set::SymbolBitSet [] [src]

pub struct SymbolBitSet {
    // some fields omitted
}

A set of symbols in the form of a bit vector.

Methods

impl SymbolBitSet

fn new<'a, G>(grammar: &'a G, elem: bool) -> Self where G: ContextFree, &'a G: ContextFreeRef<'a, Target=G>

Constructs a SymbolBitSet.

fn terminal_set<'a, G>(grammar: &'a G) -> Self where G: ContextFree, &'a G: ContextFreeRef<'a, Target=G>

Gathers information about whether symbols are terminal or nonterminal. Constructs a set of terminal symbols.

Constructs a data structure in O(n) time.

fn has_sym(&self, sym: Symbol) -> bool

Checks whether a given symbol is in this set.

fn into_bit_vec(self) -> BitVec

Converts into a bit vector.

fn iter(&self) -> Iter

Iterates over symbols in the set.