context-free-grammar-0.1.1: Basic algorithms on context-free grammars
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Cfg.LookaheadSet

Description

Sets of lookahead symbols.

Synopsis

Documentation

data LookaheadSet t Source #

Set of lookahead symbols providing different Monoid semantics than Set. (mappend implements concatenation, not set union.)

Instances

Instances details
Eq t => Eq (LookaheadSet t) Source # 
Instance details

Defined in Data.Cfg.LookaheadSet

Ord t => Ord (LookaheadSet t) Source # 
Instance details

Defined in Data.Cfg.LookaheadSet

Show t => Show (LookaheadSet t) Source # 
Instance details

Defined in Data.Cfg.LookaheadSet

Ord t => Semigroup (LookaheadSet t) Source # 
Instance details

Defined in Data.Cfg.LookaheadSet

Ord t => Monoid (LookaheadSet t) Source # 
Instance details

Defined in Data.Cfg.LookaheadSet

mkLookaheadSet Source #

Arguments

:: Ord t 
=> Bool

true iff it has EOF

-> [t]

terminal symbols

-> LookaheadSet t 

Creates a LookaheadSet

fromList :: Ord t => [AugT t] -> LookaheadSet t Source #

Creates a LookaheadSet from a list of augmented terminals.

toSet :: LookaheadSet t -> Set (AugT t) Source #

Converts the LookaheadSet to a regular Set

Set operations

empty :: LookaheadSet t Source #

The empty lookahead set.

singleton :: AugT t -> LookaheadSet t Source #

Creates a singleton lookahead set.

unions :: Ord t => [LookaheadSet t] -> LookaheadSet t Source #

Returns the union of all the lookahead sets.